Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporter get variant information works on unions #999

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

W95Psp
Copy link
Collaborator

@W95Psp W95Psp commented Oct 14, 2024

Fixes #997.
I have a meeting but then I'll push related changes in Charon.

The helper function `get_variant_information` had an assertion about
the ADT being anything but an union.  This function works fine on
unions, though. A union is just like a struct: the difference is the
semantics of its only variant. This is unrelated to
`VariantInformations`.
@Nadrieril
Copy link
Collaborator

I don't expect this requires charon changes, the CI is only broken because I haven't yet fixed charon after last PR. That's just waiting on my CI: AeneasVerif/charon#418.

@W95Psp
Copy link
Collaborator Author

W95Psp commented Oct 14, 2024

That'll break charon here: https://github.com/AeneasVerif/charon/blob/75ebb6fccdf208b92343395cd05378790d0496c3/charon/src/bin/charon-driver/translate/translate_constants.rs#L87-L98

That's very easy to fix

W95Psp added a commit to AeneasVerif/charon that referenced this pull request Oct 14, 2024
W95Psp added a commit to AeneasVerif/charon that referenced this pull request Oct 14, 2024
W95Psp added a commit to AeneasVerif/charon that referenced this pull request Oct 14, 2024
@W95Psp
Copy link
Collaborator Author

W95Psp commented Oct 14, 2024

@W95Psp
Copy link
Collaborator Author

W95Psp commented Oct 14, 2024

@Nadrieril I tagged you as a reviewer just in case you have opinions, but feel free to ignore 😃

Copy link
Collaborator

@Nadrieril Nadrieril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this is a nice improvement :)

@W95Psp W95Psp enabled auto-merge October 14, 2024 15:08
@W95Psp W95Psp force-pushed the exporter-get_variant_information-works-on-unions branch from 0710210 to 8e81a9d Compare October 14, 2024 16:11
@W95Psp W95Psp added this pull request to the merge queue Oct 14, 2024
Merged via the queue into main with commit ce9ea56 Oct 14, 2024
12 of 13 checks passed
@W95Psp W95Psp deleted the exporter-get_variant_information-works-on-unions branch October 14, 2024 16:52
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.

Exporter: handle union construction
3 participants