thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James E. King, III (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (THRIFT-4143) Order of struct and enum affect generation results
Date Mon, 27 Mar 2017 16:38:41 GMT

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

James E. King, III updated THRIFT-4143:
---------------------------------------
    Component/s:     (was: Java - Compiler)
                 Compiler (General)

> Order of struct and enum affect generation results
> --------------------------------------------------
>
>                 Key: THRIFT-4143
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4143
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (General)
>    Affects Versions: 0.9.3
>            Reporter: Mykhailo Kozik
>
> 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)

Mime
View raw message