Skip to content

fix: swapped argument order in new_inconsistent_union calls (#9001)#9010

Merged
jtdavis777 merged 2 commits into
google:masterfrom
RenzoMXD:fix/issue-9001
Apr 2, 2026
Merged

fix: swapped argument order in new_inconsistent_union calls (#9001)#9010
jtdavis777 merged 2 commits into
google:masterfrom
RenzoMXD:fix/issue-9001

Conversation

@RenzoMXD
Copy link
Copy Markdown
Contributor

Summary

  • Swapped argument order in new_inconsistent_union calls in reflection_verifier.rs
  • The call was passing (field_type, field) but the function signature expects (field, field_type)

Issue

Fixes #9001

The new_inconsistent_union() function in verifier.rs expects (field, field_type), but the call site in reflection_verifier.rs was passing the arguments in reverse order — (format!("{}_type", field.name()), field.name()). This caused confusing/misleading error messages when union verification failed.

Test plan

  • Verify union error messages now correctly report the field and field_type
  • Existing tests pass

@RenzoMXD RenzoMXD requested a review from dbaileychess as a code owner March 31, 2026 04:31
@github-actions github-actions Bot added the rust label Mar 31, 2026
@jtdavis777 jtdavis777 enabled auto-merge (squash) April 2, 2026 07:01
@jtdavis777 jtdavis777 merged commit 21b706b into google:master Apr 2, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rust: inconsistent union has value and type the wrong way round

2 participants