Jonas Marty created THRIFT-5500:
-----------------------------------
Summary: Uncompilable code when .thrift struct 'System' exists
Key: THRIFT-5500
URL: https://issues.apache.org/jira/browse/THRIFT-5500
Project: Thrift
Issue Type: Bug
Components: netstd - Compiler
Affects Versions: 0.15.0
Environment: Visual Studio 2022
.netstandard-2.0 Project
Reporter: Jonas Marty
Attachments: image-2022-01-20-14-27-34-063.png,
image-2022-01-20-14-37-18-452.png
If you have an struct in your .thrift definition with the name 'System', the
thrift compile generates uncompilable code for the Equals() method. As the
namespace 'System' gets interpreted as class. It could be fixed with prefixing
theĀ System.Object.Equals() calls with 'global::' as it is done nearly
everywhere else where non simple types are used.
!image-2022-01-20-14-27-34-063.png|width=944,height=113!
The following compiles:
!image-2022-01-20-14-37-18-452.png|width=918,height=99!
Yes I also think naming a struct 'System' is not a good idea, but here we are ;)
--
This message was sent by Atlassian Jira
(v8.20.1#820001)