-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 on strict-equality with recursive types #16483
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. One very minor code-style nit below:
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Right before merging this, I noticed there is a very similar crash that this PR would not fix. It is a bit trickier to fix, but generally the logic is the same. Note btw that deciding whether two recursive types overlap is non-trivial, for example in the case with two different recursive |
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
Fixes #16473 Potentially we can turn this helper function into a proper visitor, but I don't think it is worth it as of right now. --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Fixes #16473
Potentially we can turn this helper function into a proper visitor, but I don't think it is worth it as of right now.