Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 22, 2023

Conversation

JukkaL
Copy link
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
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
12 checks passed
@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