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

OCaml codegen exception pattern match syntax error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.12.0
    • Fix Version/s: None
    • Component/s: OCaml - Compiler
    • Labels:
      None

      Description

      For the following exception:

      exception Ex {
      1:  required string message
      }
      

      The following class and exception are generated:

      class ex : object ('a)
        ...
      end
      exception Ex of ex
      ...
      (try ...
      with
        | ex e -> ...
      

      This is a syntax error as all constructors (like ex) must start with an uppercase letter. It can be fixed by outputting | Ex e -> ....

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mXbu9O4wdGrH Yawar Amin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: