Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.9.3
-
None
Description
Thrift 0.9.3 produces invalid Go code when service definitions are written in terms of type-deffed structs.
namespace go bug struct Foo { 1:string s, } typedef Foo Bar service BarService { Bar getBar() }
Attempting to compile the Go code that Thrift outputs yields the following errors.
bug/barservice.go:192: cannot use retval (type Bar) as type *Bar in assignment bug/barservice.go:323: cannot use Foo literal (type *Foo) as type *Bar in assignment bug/barservice.go:324: p.Success.Read undefined (type *Bar has no field or method Read) bug/barservice.go:351: p.Success.Write undefined (type *Bar has no field or method Write)
Inspecting the Go code, it appears that the Go compiler is telling the truth.