Skip to content

Fix C# verification for union vectors#9174

Open
M0nd0R wants to merge 1 commit into
google:masterfrom
M0nd0R:agent/csharp-union-vector-verifier
Open

Fix C# verification for union vectors#9174
M0nd0R wants to merge 1 commit into
google:masterfrom
M0nd0R:agent/csharp-union-vector-verifier

Conversation

@M0nd0R

@M0nd0R M0nd0R commented Jul 16, 2026

Copy link
Copy Markdown

Summary

  • fix Verifier.VerifyVectorOfUnion() so C# union type vectors are indexed byte-by-byte
  • generate VerifyVectorOfUnion() calls for C# vector-of-union fields
  • add a regression test for malformed union vectors and regenerate the checked-in C# union-vector fixture

Testing

  • python3 scripts/generate_code.py --flatc build/flatc
  • ./tests/FlatBuffers.Test/.dotnet_tmp/dotnet build -c Release -f net8.0 tests/FlatBuffers.Test/FlatBuffers.Test.csproj
  • (cd tests/FlatBuffers.Test/bin/Release/net8.0 && ../../../.dotnet_tmp/dotnet FlatBuffers.Test.dll)
  • ./tests/FlatBuffers.Test/.dotnet_tmp/dotnet build -c Release -f net8.0 -p:UnsafeByteBuffer=true tests/FlatBuffers.Test/FlatBuffers.Test.csproj && (cd tests/FlatBuffers.Test/bin/Release/net8.0 && ../../../.dotnet_tmp/dotnet FlatBuffers.Test.dll)
  • ./tests/FlatBuffers.Test/.dotnet_tmp/dotnet build -c Release -f net8.0 -p:UnsafeByteBuffer=true -p:EnableSpanT=true tests/FlatBuffers.Test/FlatBuffers.Test.csproj && (cd tests/FlatBuffers.Test/bin/Release/net8.0 && ../../../.dotnet_tmp/dotnet FlatBuffers.Test.dll)

@github-actions github-actions Bot added c# c++ codegen Involving generating code from schema labels Jul 16, 2026
@M0nd0R
M0nd0R marked this pull request as ready for review July 17, 2026 14:59
@M0nd0R
M0nd0R requested a review from dbaileychess as a code owner July 17, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c# c++ codegen Involving generating code from schema

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant