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
fromtypingimportfinal@finalclassA: ...
classB: ...
a: Aassertisinstance(a, B)
reveal_type(a) # note: Revealed type is "__main__.<subclass of "A" and "B">"print("hi") # no unreachable error
…16330)
Fixes#15148
I think it also fixes the [initial
bug](#12163 (comment))
reported in #12163 (this is why I added a TypeVar test case) but not
[this
bug](#12163 (comment))
reported later in the same issue.
TypeVar
not narrowed when usingisinstance
orissubclass
onfinal
classes #12163The text was updated successfully, but these errors were encountered: