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

OCaml codegen exception pattern match syntax error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.12.0
    • 0.18.0
    • OCaml - Compiler
    • 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

            mXbu9O4wdGrH Yawar Amin
            mXbu9O4wdGrH Yawar Amin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 3h
                3h