Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
Patch Available
Description
When following is written in .thrift input
typedef i32 MyType typedef map<MyType, i32> ComplexMapType
Generator builds the following:
type ComplexMapType map[int32]int32
This patch changes the type definition to be
type ComplexMapType map[MyType]int32
Since, there is really no need to resolve key type from MyType into int32. Compiler would throw error on lines like these:
complex_var = make(map[MyType]int32, size)
also,
var _key1 MyType
...
complex_var[_key1] = _val2
Attachments
Attachments
Issue Links
- relates to
-
THRIFT-2063 Go compiler cannot create code for maps with complex/binary keys
- Open