Clemens Vasters created AVRO-3953:
-------------------------------------

             Summary: C# CodeGen.cs:503 incorrectly throws for "reserved 
keywords"
                 Key: AVRO-3953
                 URL: https://issues.apache.org/jira/browse/AVRO-3953
             Project: Apache Avro
          Issue Type: Bug
          Components: csharp
    Affects Versions: 1.11.3
         Environment: Any use of the C# generator with enums that contain 
reserved keywords
            Reporter: Clemens Vasters


The C# CodeGen.cs incorrectly chooses to throw when it encounters a C# reserved 
keyword as an enum member. 

In C#, any identifier that clashes with a reserved keyword can be escaped with 
a leading '@', e.g. this works:

enum Foo
{
    @string = 1,
    @int = 2,
    @float = 3
}

This is a pretty serious issue with any Avro schema that describes 
programming-related structures. 



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

Reply via email to