mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
Fix [C#] Object API - Invalid Property Name used in UnPackTo for unio… (#7751)
* Fix [C#] Object API - Invalid Property Name used in UnPackTo for union fieldhttps://github.com/google/flatbuffers/issues/7750, also fixes invalid Code generated in WriteJson for Unions named Value. * Test added: new schema union_value_collision.fbs with a Union named Value and a union field named value. The generated C# code now compiles when NetTest.bat. The Code generated with an older flatc.exe didn't compile because of a mismatch of the property name (Value vs. Value_). * branch was not up-to-date with master * BASE_OPTS + CPP_OPTS removed and union_value_collision_generated.h deleted Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -407,6 +407,13 @@ type_field_collsion_schema = "type_field_collsion.fbs"
|
||||
|
||||
flatc(["--csharp", "--gen-object-api"], schema=type_field_collsion_schema)
|
||||
|
||||
# Union / value collision
|
||||
flatc(
|
||||
CS_OPTS + ["--gen-object-api", "--gen-onefile"],
|
||||
prefix="union_value_collsion",
|
||||
schema="union_value_collision.fbs"
|
||||
)
|
||||
|
||||
# Generate string/vector default code for tests
|
||||
flatc(RUST_OPTS, prefix="more_defaults", schema="more_defaults.fbs")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user