Skip to content

transpile: Include enums in CastKind::from_types#1737

Merged
kkysen merged 2 commits intoimmunant:masterfrom
Rua:enum-castkind
Apr 22, 2026
Merged

transpile: Include enums in CastKind::from_types#1737
kkysen merged 2 commits intoimmunant:masterfrom
Rua:enum-castkind

Conversation

@Rua
Copy link
Copy Markdown
Contributor

@Rua Rua commented Apr 15, 2026

This wasn't catching enum types yet, so they'd end up defaulting to BitCast.

Copy link
Copy Markdown
Contributor

@fw-immunant fw-immunant left a comment

Choose a reason for hiding this comment

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

The code changes look plausible, but the practical impact of this change isn't clear to me. Does this impact generated code or enable accepting more input programs? It would be nice to have a test demonstrating changed behavior.

@Rua
Copy link
Copy Markdown
Contributor Author

Rua commented Apr 15, 2026

It's a bugfix, and it's needed to make #1620 work, since #1703 merged.

@kkysen kkysen merged commit 86bc68c into immunant:master Apr 22, 2026
11 checks passed
Copy link
Copy Markdown
Contributor

@kkysen kkysen left a comment

Choose a reason for hiding this comment

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

It seems this broke on related_decls in https://github.com/immunant/c2rust/actions/runs/24806107857/job/72600545565. Might be from a different PR that affected related_decls that this PR hadn't been rebased on? GitHub can be weird like that sometimes.

@Rua Rua deleted the enum-castkind branch April 23, 2026 09:21
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.

3 participants