Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix crash involving unreachable binary ops - #11680

Merged
JelleZijlstra merged 1 commit into
python:masterfrom
hauntsaninja:unreach
Dec 8, 2021
Merged

Fix crash involving unreachable binary ops#11680
JelleZijlstra merged 1 commit into
python:masterfrom
hauntsaninja:unreach

Conversation

@hauntsaninja

Copy link
Copy Markdown
Collaborator

Fixes #11679

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown

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
Copy Markdown
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