You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Yawar Amin (Jira)" <ji...@apache.org> on 2020/05/13 18:13:00 UTC

[jira] [Updated] (THRIFT-5208) OCaml codegen exception pattern match syntax error

     [ https://issues.apache.org/jira/browse/THRIFT-5208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yawar Amin updated THRIFT-5208:
-------------------------------
    Description: 
For the following exception:

{code}
exception Ex {
1:  required string message
}
{code}

The following class and exception are generated:

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

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

  was:
For the following exception:

{code:thrift}
exception Ex {
1:  required string message
}
{code}

The following class and exception are generated:

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

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


> OCaml codegen exception pattern match syntax error
> --------------------------------------------------
>
>                 Key: THRIFT-5208
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5208
>             Project: Thrift
>          Issue Type: Bug
>          Components: OCaml - Compiler
>    Affects Versions: 0.12.0
>            Reporter: Yawar Amin
>            Priority: Major
>
> For the following exception:
> {code}
> exception Ex {
> 1:  required string message
> }
> {code}
> The following class and exception are generated:
> {code}
> class ex : object ('a)
>   ...
> end
> exception Ex of ex
> ...
> (try ...
> with
>   | ex e -> ...
> {code}
> This is a syntax error as all constructors (like {ex}) must start with an uppercase letter. It can be fixed by outputting {| Ex e -> ...}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)