GitHub user tylertreat opened a pull request:
https://github.com/apache/thrift/pull/918
THRIFT-3705 Go map incorrect types with map typedef
Generating the following IDL results in Go code which does not compile:
```
typedef map<Foo, Foo> FooMap
struct Foo {}
service Service {
void foo(1: FooMap fooMap)
}
```
./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:
```
struct Foo {}
typedef map<Foo, Foo> FooMap
service Service {
void foo(1: FooMap fooMap)
}
```
https://issues.apache.org/jira/browse/THRIFT-3705
@markerickson-wf
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tylertreat/thrift THRIFT-3705
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/918.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 #918
----
commit 5d559298d3022e6c7cdcc728a11d4cd6eca3415d
Author: Tyler Treat <[email protected]>
Date: 2016-03-04T05:36:25Z
THRIFT-3705 Go map incorrect types with map typedef
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---