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

ASF GitHub Bot commented on THRIFT-3705:
----------------------------------------

GitHub user Jens-G opened a pull request:

    https://github.com/apache/thrift/pull/951

    THRIFT-3705 Go map has incorrect types when used with forward-defined…

    … types
    
    Client: Go
    Patch: Jens Geyer
    
    Essentially, this is the same patch as Tyler already proposed with his PR. 
I ended up with more or less the same conclusion code-wise, and so I'd like to 
give it another try.
    
    @markerickson-wf 


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Jens-G/thrift THRIFT-3705

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/951.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #951
    
----
commit c17eefaf80254b0251aa6e97c0ac9290de7198d4
Author: Jens Geyer <[email protected]>
Date:   2016-03-15T22:41:59Z

    THRIFT-3705 Go map has incorrect types when used with forward-defined types
    Client: Go
    Patch: Jens Geyer

----


> Go map has incorrect types when used with forward-defined types
> ---------------------------------------------------------------
>
>                 Key: THRIFT-3705
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3705
>             Project: Thrift
>          Issue Type: Bug
>          Components: Go - Compiler
>            Reporter: Tyler Treat
>            Assignee: Jens Geyer
>            Priority: Minor
>
> Generating the following IDL results in Go code which does not compile:
> {code}
> typedef map<Foo, Foo> FooMap
> struct Foo {}
> service Service {
>     void foo(1: FooMap fooMap)
> }
> {code}
> ./service.go:278: cannot use _key4 (type *Foo) as type Foo in map index
> ./service.go:278: cannot use _val5 (type *Foo) as type Foo in assignment
> However, if the struct precedes the typedef, the code is generated correctly:
> {code}
> struct Foo {}
> typedef map<Foo, Foo> FooMap
> service Service {
>     void foo(1: FooMap fooMap)
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to