ASF GitHub Bot commented on THRIFT-4554:

Jens-G opened a new pull request #1539: THRIFT-4554 uncompileable code with 
member names that are also types …
URL: https://github.com/apache/thrift/pull/1539
   …under specific conditions
   Client: Delphi
   Patch: Jens Geyer
   Some helpful tips for a successful Apache Thrift PR:
   * Did you test your changes locally or using CI in your fork?
   * Is the Apache Jira THRIFT ticket identifier in the PR title?
   * Is the Apache Jira THRIFT ticket identifier in the commit message?
   * Did you squash your changes to a single commit?
   * Are these changes backwards compatible? (please say so in PR description)
   * Do you need to update the language-specific README?
   Example ideal pull request title:
           THRIFT-9999: an example pull request title
   Example ideal commit message:
           THRIFT-9999: [summary of fix, one line if possible]
           Client: [language(s) affected, comma separated, use lib/ directory 
names please]
   For more information about committing, see CONTRIBUTING.md

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> uncompileable code with member names that are also types under specific 
> conditions
> ----------------------------------------------------------------------------------
>                 Key: THRIFT-4554
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4554
>             Project: Thrift
>          Issue Type: Bug
>          Components: Delphi - Compiler
>            Reporter: Jens Geyer
>            Assignee: Jens Geyer
>            Priority: Major
> {code}
> enum Foobar {
>   Foo = 0,
>   Bar = 1,
>   Baz = 2,
> }
> struct SomeStruct {
>   1 : optional double MinValue
>   2 : optional double MaxValue
>   3 : optional bool Integer  // causes issue
>   4 : optional Foobar Foo
> }
> {code}
> generates uncompileable delphi code around field #4 (not 3!), because of a 
> type cast that uses unqualified {{Integer}}.
> Workaround: don't name the field "Integer" ... :-)

This message was sent by Atlassian JIRA

Reply via email to