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:
Stefan F
2023-01-07 21:37:22 +01:00
committed by GitHub
parent 06f2a3dce9
commit b5802b57f2
5 changed files with 362 additions and 4 deletions

View File

@@ -169,6 +169,9 @@
<Compile Include="..\nested_namespace_test\nested_namespace_test3_generated.cs">
<Link>nested_namespace_test\nested_namespace_test3_generated.cs</Link>
</Compile>
<Compile Include="..\union_value_collsion\union_value_collision_generated.cs">
<Link>union_value_collsion\union_value_collision_generated.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>