-
-
Notifications
You must be signed in to change notification settings - Fork 3k
[1.16 regression] failure to exhaustively narrow type var bounded by union #19159
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
Comments
Bisects to #18972 |
I would say though that I think the above example should probably only work if the two classes are decorated with |
I'm a little surprised that we apparently don't have a test for this. This looks like a significant regression, though it wasn't obvious likely because many projects we test against still support 3.9, which doesn't support the match statement. cc @ilevkivskyi as the author of #18972 |
I didn't realized that this only happens in a fairly specific scenario. Having everything in a single file doesn't reproduce the issue. |
I may not have time to properly look into this until weekend, but FWIW this looks really niche to me. I would even say we may go ahead with the release and fix this later, unless this causes big troubles for some repos. |
Ok, I treat this as a non-blocker for the release. |
Ok, that's fine on my end, there's only a few |
Courtesy of @delfick
So if we have two files
and
Then I get no errors with mypy 1.15 and this error with 1.16
The text was updated successfully, but these errors were encountered: