You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 4, 2025. It is now read-only.
We should be able to add a check for various reserved words being used or other problems that will end up causing C# compilation errors. For example the following enum will cause a compilation error because it uses the reserved word class as its name:
enumclass {
Class1,Class2
}
In that particular situation we've got at least the following options:
Just don't allow it, and output an error message.
Rename class to @class in the generated code.
Rename to @class, and output a warning that we're having to automatically rename it.
Options 2 and 3 are probably the best option to support cross-platform thrift files where a name might use a reserved word in one language but not another, but obviously the first option is the simplest.
There may also be other situations where renaming like that isn't an option.
We should be able to add a check for various reserved words being used or other problems that will end up causing C# compilation errors. For example the following enum will cause a compilation error because it uses the reserved word
classas its name:In that particular situation we've got at least the following options:
classto@classin the generated code.@class, and output a warning that we're having to automatically rename it.Options 2 and 3 are probably the best option to support cross-platform thrift files where a name might use a reserved word in one language but not another, but obviously the first option is the simplest.
There may also be other situations where renaming like that isn't an option.