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

Hudson commented on THRIFT-2089:
--------------------------------

FAILURE: Integrated in Thrift #802 (See 
[https://builds.apache.org/job/Thrift/802/])
THRIFT-2089 Compiler ignores duplicate typenames (roger: rev 
ba406d3a022967e6189249bd8e805f0eb9ac2921)
* lib/cpp/test/concurrency/ThreadManagerTests.h
* lib/cpp/test/concurrency/ThreadFactoryTests.h
* compiler/cpp/src/parse/t_program.h
* compiler/cpp/src/thrifty.yy
* lib/cpp/test/TFileTransportTest.cpp

                
> Compiler ignores duplicate typenames
> ------------------------------------
>
>                 Key: THRIFT-2089
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2089
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (General)
>    Affects Versions: 1.0
>         Environment: all
>            Reporter: Randy Abernethy
>            Assignee: Randy Abernethy
>            Priority: Minor
>             Fix For: 1.0
>
>         Attachments: 0001-added-compiler-duplicate-typename-checking.patch
>
>
> The current IDL compiler will compile the following IDL with no warnings or 
> errors:
> {code:title=test.thrift|borderStyle=solid}
> struct A { 1: i16 a }
> struct A { 1: i16 a }
> {code}
> and this (w/ thrift -r):
> {code:title=test2.thrift|borderStyle=solid}
> include "test.thrift"
> struct A { 1: i16 a }
> {code}
> Both of these IDLs generate un-compilable output in most languages.
> The attached patch adds typename collision checking to the compiler. It 
> generates errors when a typename is declared twice in the same file or when 
> the same typename is declared in two files causing collisions in all 
> namespace scopes. Explicit namespace declarations with collisions in some but 
> not all scopes are reported as warning because the user could compile for a 
> scope that would succeed. More details in the patch comments.
> Built and tested on Windows with VS2012 and Unbuntu w/ gcc 4.7.2
> make check ran on Unbuntu clean (though I had to switch the config.h to 
> thrift/thrift-config.h in TFileTransportTest.cpp)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to