pyright
pyright copied to clipboard
Incorrect handling of class that is a subtype of multiple constraints in a value-constrained TypeVar
The following should type check without errors:
from typing import TypeVar, reveal_type
class A:
...
class B:
...
class C(A, B):
...
T = TypeVar("T", A, B)
def test(a: T, b: T):
...
test(A(), C())
test(B(), C()) # False positive error