Skip to content

fix(unions): reinterpret payload on field reads#1016

Draft
Stevengre wants to merge 2 commits intomasterfrom
codex/20260403-union-field-access
Draft

fix(unions): reinterpret payload on field reads#1016
Stevengre wants to merge 2 commits intomasterfrom
codex/20260403-union-field-access

Conversation

@Stevengre
Copy link
Copy Markdown
Contributor

Summary

  • reinterpret stored union payloads through the accessed field type when reading a union field
  • preserve integer payload bits while adapting signedness and width to the accessed field type

Test plan

  • cd kmir && uv run pytest src/tests/integration/test_integration.py -k "unions-fail or pointer-cast-length-test-fail or raw-ptr-cast-fail or ptr-through-wrapper-fail or ref-ptr-cast-elem-fail or ref-ptr-cast-elem-offset-fail" -q

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant