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

Fix crash involving unreachable binary ops #11680

Merged
merged 1 commit into from
Dec 8, 2021

Conversation

hauntsaninja
Copy link
Collaborator

Fixes #11679

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

👀

Comment on lines +1425 to +1427
a and 1 # E: Right operand of "and" is never evaluated
a or 1 # E: Right operand of "or" is never evaluated
a or a # E: Right operand of "or" is never evaluated

Choose a reason for hiding this comment

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

Why Right? Maybe Left?

Copy link
Member

Choose a reason for hiding this comment

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

Right is correct, the left operand is always evaluated.

@JelleZijlstra JelleZijlstra merged commit e20042f into python:master Dec 8, 2021
@hauntsaninja hauntsaninja deleted the unreach branch December 8, 2021 18:38
tushar-deepsource pushed a commit to DeepSourceCorp/mypy that referenced this pull request Jan 20, 2022
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.

INTERNAL ERROR with NoReturn in a boolean operation
4 participants