Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
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) }
Attachments
Issue Links
- is related to
-
THRIFT-5601 Typedef after first use causes incorrect go code
- Reopened
- relates to
-
THRIFT-3465 Go Code With Complex Const Initializer Compilation Depends On Struct Order
- Closed
-
THRIFT-3553 Go Map value type is dependent on order of entity definitions
- Closed