[ 
https://issues.apache.org/jira/browse/THRIFT-2112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13728493#comment-13728493
 ] 

Hudson commented on THRIFT-2112:
--------------------------------

FAILURE: Integrated in Thrift #829 (See 
[https://builds.apache.org/job/Thrift/829/])
THRIFT-2112 Error in Go generator when using typedefs in map keys (jensg: rev 
656a17305093a1fda754b669f4cb9ce4e98ec2d1)
* lib/go/test/IncludesTest.thrift
* compiler/cpp/src/generate/t_go_generator.cc

                
> Error in Go generator when using typedefs in map keys
> -----------------------------------------------------
>
>                 Key: THRIFT-2112
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2112
>             Project: Thrift
>          Issue Type: Bug
>          Components: Go - Compiler
>            Reporter: Emir Habul
>              Labels: newbie, patch
>             Fix For: 0.9.1
>
>         Attachments: thrift-map-keys.patch
>
>
> When following is written in {{.thrift}} input
> {code}
>   typedef i32 MyType
>   typedef map<MyType, i32> ComplexMapType
> {code}
> Generator builds the following:
> {code}
>   type ComplexMapType map[int32]int32
> {code}
> This patch changes the type definition to be
> {code}
>   type ComplexMapType map[MyType]int32
> {code}
> Since, there is really no need to resolve key type from MyType into int32. 
> Compiler would throw error on lines like these:
> {code}
>   complex_var = make(map[MyType]int32, size)
> {code}
> also,
> {code}
>   var _key1 MyType
>   ...
>   complex_var[_key1] = _val2
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to