Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-399

Fix set and number issues in generated constant code

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Haskell - Compiler
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      The compiler generates incorrect code for set constants.

      First, the function "mkSet" (which does not exist) is being called on a list of constants to make the set. "Set.fromList" should be used in place of "mkSet". Second, no commas appear in the generated list, so all the values are getting smushed together, which is likely to cause syntax errors in the generated code if the constants are anything but numbers. Third, no type annotations were being generated for the constants, which means that number literals were being assigned a type of Integer rather than Int or Int64.

        Attachments

          Activity

            People

            • Assignee:
              seliopou Spiros Eliopoulos
              Reporter:
              seliopou Spiros Eliopoulos
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: