Negative type narrowing fails for protocols with overloaded methods #12228
Labels
bug
mypy got something wrong
topic-overloads
topic-type-narrowing
Conditional type narrowing / binder
Bug Report
Since the merging of #9904 it is now possible to use runtime-checkable protocols with overloaded methods. While type narrowing now happens successfully with
isinstance
/issubclass
checks in the positive case, the same does not hold for the negative case, be it either vianot isinstance
/not issubclass
or a anelse
statement.To Reproduce
Expected Behavior
Observed Behavior
Your Environment
master
branch (post-b22c4e4)mypy.ini
(and other config files): n.a.The text was updated successfully, but these errors were encountered: