Jens Geyer created THRIFT-4947:
----------------------------------
Summary: Struct constants yield No field named "" was found in
struct of type "Nested"
Key: THRIFT-4947
URL: https://issues.apache.org/jira/browse/THRIFT-4947
Project: Thrift
Issue Type: Bug
Components: Compiler (General)
Affects Versions: 0.13.0
Reporter: Jens Geyer
Assignee: Jens Geyer
{code:java}
enum E {
A = 1,
B = 2,
C = 3
}
struct Nested {
1: i64 f1,
2: required string f2,
3: optional E f3 = E.B
}
union Union {
1: string f1;
2: string f2;
}
struct TestStruct {
1: optional E f1 = E.A,
2: required i64 f2 = 1,
3: required string f3 = "f3",
4: Nested f4 = \{ f1 : 24, f2 : "i am required", f3 : E.B }
5: Union f5 = \{f1:"one"}
6: map<string, i64> f6 = \{ "hello": 42, "goodbye":24 },
7: set<i64> f7 = [ 1, 2, 3, -4 ]
8: list<string> f8 = ["bla","bla","bla"]
}
{code}
Leads to
{{[FAILURE:D:test.thrift:23] No field named "" was found in struct of type
"Nested"}}
at 4:Nested and 5:Union
--
This message was sent by Atlassian Jira
(v8.3.2#803003)