Skip to content

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

Open
RenzoMXD wants to merge 1 commit intogoogle:masterfrom
RenzoMXD:fix/issue-9001
Open

fix: swapped argument order in new_inconsistent_union calls (#9001)#9010
RenzoMXD wants to merge 1 commit intogoogle: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
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

1 participant