Skip to content

[mypyc] Don't crash on unreachable statements#16311

Merged
JukkaL merged 1 commit intomasterfrom
mypyc-fixunreachable-crash
Oct 22, 2023
Merged

[mypyc] Don't crash on unreachable statements#16311
JukkaL merged 1 commit intomasterfrom
mypyc-fixunreachable-crash

Conversation

@JukkaL
Copy link
Copy Markdown
Collaborator

@JukkaL JukkaL commented Oct 21, 2023

Skip them instead. This applies to statements after break, continue, return and raise statements.

It's common to have unreachable statements temporarily while working on a half-finished change, so generating an error is perhaps not the best option.

Fixes mypyc/mypyc#1028.

Skip them instead. This applies to statements after break,
continue, return and raise statements.

It's common to have unreachable statements temporarily while working
on a half-finish change, so generating an error is perhaps not the
best option.

Fixes mypyc/mypyc#1028.
Copy link
Copy Markdown
Collaborator

@msullivan msullivan left a comment

Choose a reason for hiding this comment

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

Nice fix to an old problem

@JukkaL JukkaL merged commit 2d54024 into master Oct 22, 2023
@JukkaL JukkaL deleted the mypyc-fixunreachable-crash branch October 22, 2023 00:06
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.

Dead code triggers mypyc assertion

2 participants