Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.2
-
None
-
Windows 7 64-bit
cygwin-built compiler from thrift-0.2.0 source
Description
When I generate Java source from a thrift file where I assign a default enum value, the compiler correctly interprets the thrift file, but the source it generates assigns an integer to an enum field, which is a compiler error.
A thrift file like this:
enum MyEnum {
MY_ENUM_VALUE=7
}
struct MyStruct {
1 : MyEnum myEnum = MY_ENUM_VALUE
}
generates a constructor that looks like this:
public MyStruct() { this.myEnum = 7 }
but it should generate this:
public MyStruct () { this.myEnum = MyEnum.MY_ENUM_VALUE }