You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Tom Deering (JIRA)" <ji...@apache.org> on 2016/01/05 23:55:40 UTC
[jira] [Commented] (THRIFT-3466) Set Parameters Have Wrong Key Type
in Go Code
[ https://issues.apache.org/jira/browse/THRIFT-3466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15083997#comment-15083997 ]
Tom Deering commented on THRIFT-3466:
-------------------------------------
This appears to affect lists as well as sets.
> Set Parameters Have Wrong Key Type in Go Code
> ---------------------------------------------
>
> Key: THRIFT-3466
> URL: https://issues.apache.org/jira/browse/THRIFT-3466
> Project: Thrift
> Issue Type: Improvement
> Components: Go - Compiler
> Affects Versions: 0.9.3
> Environment: Go 1.4.2
> Thrift 0.9.3
> Ubuntu Linux 14.04
> amd64
> Reporter: Tom Deering
> Labels: golang
>
> When Thrift 0.9.3 generates Go code for a service with a parameter that is of type set<typedeffed thing>, the generated Go code parameter is of type map[untypedeffed thing]bool. For example:
> Thrift
> {code}
> namespace go bug
> typedef string Foo
> service FooService{
> void bar (1:set<Foo> foos)
> }
> {code}
> Go
> {code}
> func (p *FooServiceClient) Bar(foos map[string]bool) (err error)
> {code}
> The key type of the Go map should be Foo, not string.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)