Uh oh!
There was an error while loading. Please reload this page.
Fix testLiteralMeets failure - #15659
Conversation
ikonst
commented
Jul 13, 2023
👁️ @sobolevn |
sobolevn
left a comment
There was a problem hiding this comment.
Thanks! I want someone else to review this as well :)
| reveal_type(unify(f1)) # N: Revealed type is "Literal[1]" | ||
| reveal_type(unify(f2)) # N: Revealed type is "<nothing>" | ||
| if object(): |
There was a problem hiding this comment.
This seems like a regression to me, because this is not "really <nothing>, execution is stopped", it is just "we cannot do a better job with two literal values".
In the long run we need to figure out how to tell these two cases apart.
There was a problem hiding this comment.
This was always the case for function scope. I only made module scope work the same way.
I agree that entire behavior leaves a lot to be desired, and I'll try to work on that next.
(Fwiw, it's also broken that "cannot call function of unknown type" is treated differently than "expression has uninhibited type".)
Since #15386, any uninhabited type in module scope causes the rest of the block to go unchecked.
Fixes#15657.