transpile: Translate enums in switch as their own type instead of integers - #1817
Draft
Rua wants to merge 14 commits into
Draft
transpile: Translate enums in switch as their own type instead of integers#1817Rua wants to merge 14 commits into
switch as their own type instead of integers#1817Rua wants to merge 14 commits into
Conversation
Rua
force-pushed
the
match-enum
branch
2 times, most recently
from
August 5, 2026 12:04
dc3e839 to
099f867
Compare
ahomescu
requested changes
Aug 6, 2026
ahomescu
left a comment
Contributor
There was a problem hiding this comment.
This needs a rebase, but CI should pass now.
Rua
force-pushed
the
match-enum
branch
4 times, most recently
from
August 6, 2026 20:04
84cf432 to
eb10415
Compare
Contributor
|
I think there might be one codegen bug here: for this C code the transpiled Rust code fails to compile. Let me know if you reproduce it. |
Rua
force-pushed
the
match-enum
branch
2 times, most recently
from
August 7, 2026 08:16
a896bfd to
fd1a4f7
Compare
Contributor
Author
|
Yeah I could reproduce it. Fixed now, I hope. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
can_propagate_castfunction, elide some more casts #1770casetranslation #1776casestatements do not preserve enum constants #1775Enum constant names are now preserved in match arms where present, which significantly improves code fidelity.