KEMBAR78
Fix crash involving unreachable binary ops by hauntsaninja · Pull Request #11680 · python/mypy · GitHub
Skip to content

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