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 2024/10/24 22:31:00 UTC

[jira] [Updated] (THRIFT-5827) enums in typedefs are not resolved in all cases

     [ https://issues.apache.org/jira/browse/THRIFT-5827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jens Geyer updated THRIFT-5827:
-------------------------------
    Description: 
Depending on the order of the IDL declarations some enum typedefs are not properly resolved for Delphi targets.

This fails to resolve MyEnumV2:
{code:java}
struct Foo {
    1: TypeDefedEnum Value
}

typedef SomeEnum TypeDefedEnum

enum SomeEnum { First, Second, Last }
{code}
This works (= workaround):
{code:java}
struct Foo {
    1: TypeDefedEnum Value
}

enum SomeEnum { First, Second, Last }

// place typedef after enum decl
typedef SomeEnum TypeDefedEnum

{code}
 

  was:
Depending on the order of the IDL declarations some enum typedefs are not proiperly resolved. 

This fails to resolve MyEnumV2:
{code}
struct Foo {
    1: TypeDefedEnum Value
}

typedef SomeEnum TypeDefedEnum

enum SomeEnum { First, Second, Last }
{code}

This works (= workaround):
{code}
struct Foo {
    1: TypeDefedEnum Value
}

enum SomeEnum { First, Second, Last }

// place typedef after enum decl
typedef SomeEnum TypeDefedEnum

{code}



 


> enums in typedefs are not resolved in all cases
> -----------------------------------------------
>
>                 Key: THRIFT-5827
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5827
>             Project: Thrift
>          Issue Type: Bug
>          Components: Delphi - Compiler
>            Reporter: Jens Geyer
>            Assignee: Jens Geyer
>            Priority: Major
>
> Depending on the order of the IDL declarations some enum typedefs are not properly resolved for Delphi targets.
> This fails to resolve MyEnumV2:
> {code:java}
> struct Foo {
>     1: TypeDefedEnum Value
> }
> typedef SomeEnum TypeDefedEnum
> enum SomeEnum { First, Second, Last }
> {code}
> This works (= workaround):
> {code:java}
> struct Foo {
>     1: TypeDefedEnum Value
> }
> enum SomeEnum { First, Second, Last }
> // place typedef after enum decl
> typedef SomeEnum TypeDefedEnum
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)