[ 
https://issues.apache.org/jira/browse/THRIFT-2311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13869892#comment-13869892
 ] 

Hudson commented on THRIFT-2311:
--------------------------------

SUCCESS: Integrated in Thrift #1000 (See 
[https://builds.apache.org/job/Thrift/1000/])
THRIFT-2311 Go: invalid code generated when exception name is a go keyword 
(jensg: rev a16737a87f74d5642869d3315f6b44a6b0fc91d3)
* compiler/cpp/src/generate/t_go_generator.cc


> Go: invalid code generated when exception name is a go keyword
> --------------------------------------------------------------
>
>                 Key: THRIFT-2311
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2311
>             Project: Thrift
>          Issue Type: Bug
>          Components: Go - Compiler
>         Environment: All platforms
>            Reporter: Krzysztof Godlewski
>            Assignee: Jens Geyer
>              Labels: reserved-word
>             Fix For: 0.9.2
>
>         Attachments: thrift-go.patch
>
>
> Go code generator emits invalid code when a service method is declared to 
> throw an exception, which name is a Go keyword.
> To reproduce, create gobug.thrift:
> {code:title=gobug.thrift}
> exception FooError { }
> service Foo {
>         void bar() throws (1: FooError error)
> }
> {code}
> Run:
> {code}
> thrift -gen go gobug.thrift && (cd gen-go/gobug && go build -a)
> {code}
> This should result in the following error:
> {code}
> ./foo.go:106: result1.Error undefined (type *BarResult has no field or method 
> Error)
> ./foo.go:107: type error is not an expression
> ./foo.go:107: cannot assign to <nil>.error
> ./foo.go:107: result1.Error undefined (type *BarResult has no field or method 
> Error)
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to