Jens Geyer created THRIFT-1904:
----------------------------------

             Summary: Incorrect code is generated for typedefs which use 
included types
                 Key: THRIFT-1904
                 URL: https://issues.apache.org/jira/browse/THRIFT-1904
             Project: Thrift
          Issue Type: Bug
          Components: Delphi - Compiler
         Environment: Windows
            Reporter: Jens Geyer
            Assignee: Jens Geyer
             Fix For: 1.0


If a typedef refers to a type that is defined in an included IDL file, the code 
for the typedef is not generated. Furthermore, the Compiler issues a warning 
about pending typedefs.

If the typedef is used elsewhere in the code, the generated code cannot be 
compiled because of the missing code for the pending typedefs.

Inner IDL file:
{code}
namespace * bug.Uncompileable.Inner

struct InnerStruct { }
{code}

Outer IDL file:
{code}
namespace * bug.Uncompileable.Outer

include "bug_codegen_inner.thrift"

struct AnotherStruct
{
}

typedef bug_codegen_inner.InnerStruct OuterStruct
typedef AnotherStruct AnotherRedefined

struct OuterContainer {
  1: AnotherRedefined MoreData
  2: OuterStruct  SomeData
}
{code}

In this example, the typedef for OuterStruct is not generated, thus Delphi 
fails to compile OuterContainer.


--
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