You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (JIRA)" <ji...@apache.org> on 2014/04/19 13:54:16 UTC

[jira] [Comment Edited] (THRIFT-2009) Go redeclaration error

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

Jens Geyer edited comment on THRIFT-2009 at 4/19/14 11:52 AM:
--------------------------------------------------------------

I think you're right. Do you have a patch ready?


was (Author: jensg):
I think you're right. Mind to provide a patch?

> Go redeclaration error
> ----------------------
>
>                 Key: THRIFT-2009
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2009
>             Project: Thrift
>          Issue Type: Bug
>          Components: Go - Compiler
>            Reporter: Jens Geyer
>            Assignee: Jens Geyer
>             Fix For: 0.9.2
>
>         Attachments: thrift-2009_redeclaration_error.patch, thrift-2009_testcase.thrift
>
>
> The following IDL code works perfectly with other languages:
> {code}
> namespace * Test
> struct Project {
>   1 : required string projectID
> }
> struct NewProject {
>   1 : required string name
> }
> service Sample {
>   Project CreateNewProject( 1: NewProject project) 
> }
> {code}
> The result I get here is
> {quote}
> gen-go\Test\Sample.go:455: missing argument to conversion to NewProject: NewProject()
> gen-go\Test\ttypes.go:191: NewProject redeclared in this block
>         previous declaration at gen-go\Test\ttypes.go:25
> {quote}
> Seems as if the generated NewProject() method conflicts with the struct name. As my Go knowledge is somewhat limited, I'm not sure about whether or not this issue blocks the acceptance of THRIFT-1980, so I created a new ticket. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)