Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
Description
Deserialization code of map type properties will generate a compilation error if the type definition of the value appears after the definition of the map where it is used.
Error Example
struct TestsResponse { 1: map<string, Test> tests } struct Test { 1: string id 2: string name }
Compilation Error
ttypes.go:83: cannot use _val1 (type *Test) as type Test in assignment
In the example moving the definition of 'Test' to appear before 'TestResponse' avoids the compilation error.
Attachments
Issue Links
- is related to
-
THRIFT-3705 Go map has incorrect types when used with forward-defined types
- Closed