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

James E. King, III reassigned THRIFT-4143:
------------------------------------------

    Assignee: James E. King, III

> Order of struct and enum affect generation results
> --------------------------------------------------
>
>                 Key: THRIFT-4143
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4143
>             Project: Thrift
>          Issue Type: Question
>          Components: Compiler (General)
>    Affects Versions: 0.9.3
>            Reporter: Mykhailo Kozik
>            Assignee: James E. King, III
>
> The following thrift IDL produce generation error 
> {code}
> namespace java com.mishadoff.sample
> struct Request {
>   1: optional Mode mode = Mode.APPEND
> }
> enum Mode {
>   APPEND = 1
>   OVERWRITE = 2
> }
> {code}
> {code}
> [FAILURE:/Users/mkoz/temp/enum_order.thrift:5] No enum value or constant 
> found named "Mode.APPEND"!
> {code}
> However, if you put enum before struct it compiles fine. Should order of 
> structs or enums impact the compilation process?
> {code}
> namespace java com.mishadoff.sample
> enum Mode {
>   APPEND = 1
>   OVERWRITE = 2
> }
> struct Request {
>   1: optional Mode mode = Mode.APPEND
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to