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

compiler generates uncompilable code

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.3
    • Fix Version/s: 0.10.0
    • Component/s: Haskell - Compiler
    • Labels:
      None
    • Environment:

      Linux x86-64, GHC 7.8 and 7.10

      Description

      When given an input with a line like "2: optional i32 anchorTokenIndex = -1", thrift generates code like "tokenRefSequence_anchorTokenIndex = P.Just -1", but without parentheses around or a dollar sign preceding it, the negative part of the literal gets treated as a function and this can't compile, leading to:

      Not in scope: ‘-’
      Perhaps you meant ‘P.-’ (imported from Prelude)

        Attachments

          Activity

            People

            • Assignee:
              tlippy01 Tom Lippincott
              Reporter:
              tlippy01 Tom Lippincott
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: