[ https://issues.apache.org/jira/browse/THRIFT-3491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tom Deering updated THRIFT-3491: -------------------------------- Labels: golang service thrift typedef (was: golang thrift typedef) > Invalid Go Code From Service Signatures With Typedef'd Structs > -------------------------------------------------------------- > > Key: THRIFT-3491 > URL: https://issues.apache.org/jira/browse/THRIFT-3491 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler > Affects Versions: 0.9.3 > Reporter: Tom Deering > Labels: golang, service, thrift, typedef > > Thrift 0.9.3 produces invalid Go code when service definitions are written in > terms of type-deffed structs. > {code} > namespace go bug > struct Foo { > 1:string s, > } > typedef Foo Bar > service BarService { > Bar getBar() > } > {code} > Attempting to compile the Go code that Thrift outputs yields the following > errors. > {code} > 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) > {code} > Inspecting the Go code, it appears that the Go compiler is telling the truth. -- This message was sent by Atlassian JIRA (v6.3.4#6332)