zcsizmadia commented on code in PR #2783:
URL: https://github.com/apache/avro/pull/2783#discussion_r1511268112


##########
lang/csharp/src/apache/main/CodeGen/CodeGen.cs:
##########
@@ -498,12 +496,13 @@ protected virtual void processEnum(Schema schema)
 
             foreach (string symbol in enumschema.Symbols)
             {
+                var effectiveSymbol = symbol;
                 if (CodeGenUtil.Instance.ReservedKeywords.Contains(symbol))
                 {
-                    throw new CodeGenException("Enum symbol " + symbol + " is 
a C# reserved keyword");
+                    effectiveSymbol = "@" + symbol;

Review Comment:
   Could we utilize the `CodeGenUtil.Instance.Mangle(...)` here. Something like 
`symbol = CodeGenUtil.Instance.Mangle(symbol)`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to