You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just fixed a longstanding bug in pyright that ty appears to suffer from too. It's related to literal patterns in case statements. The runtime uses equality checks for literal pattern matching, but equality checks can succeed for non-overlapping types.
Consider the following:
deffunc(x: int):
matchx:
case1.0:
reveal_type(x) # ty incorrectly reveals Never hereprint("This code is reachable")
func(1)