Skip to content

transpile: Don't require WithStmts for make_cast and other cast functions - #2010

Open
Rua wants to merge 2 commits into
immunant:masterfrom
Rua:make_cast-no-withstmts
Open

Rua wants to merge 2 commits into
immunant:masterfrom
Rua:make_cast-no-withstmts

Conversation

@Rua

@Rua Rua commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

The only thing here that actually required a WithStmts specifically was an assert for the NullToPointer case. That case was throwing out the existing WithStmts and replacing it with a new one, resulting in a double translation. NullToPointer is never returned by CastKind::from_types, and so that path is only ever hit when being called from convert_cast. So I just moved NullToPointer there instead.

@Rua
Rua force-pushed the make_cast-no-withstmts branch 8 times, most recently from 53ee966 to 9874c82 Compare September 15, 2026 19:12
@Rua
Rua force-pushed the make_cast-no-withstmts branch from 9874c82 to 87e2433 Compare September 15, 2026 19:19
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