Skip to content

transpile: Move handling of ToUnion and NullToPointer casts to convert_cast - #2050

Open
Rua wants to merge 3 commits into
immunant:masterfrom
Rua:union-null-cast-refactor
Open

Rua wants to merge 3 commits into
immunant:masterfrom
Rua:union-null-cast-refactor

Conversation

@Rua

@Rua Rua commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

This removes the need for the opt_field_id parameter of make_cast_full, and for the convert_cast_to_union function, which more or less duplicated what convert_union_literal was doing. Moving the NullToPointer cast removes the need to discard the already-translated val, and also the need for make_cast_full to take a WithStmts value.

@Rua
Rua force-pushed the union-null-cast-refactor branch from b3b9858 to 2befc11 Compare November 6, 2026 11:29
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