Hi, regarding the issue opened here:
astral-sh/ty#2255
Can you please provide clarification on how TypeVars in a function like func in the below code should be resolved?
class A:
pass
class B(A):
pass
class C(A):
pass
def func[T: A](x: T, y: T) -> T:
...
func(B(), C()) # I think this should raise a type error by type checkers but no type checker (mypy, pyright, etc) raise an error for this
Please look at these comments:
astral-sh/ty#2255 (comment)
astral-sh/ty#2255 (comment)
astral-sh/ty#2255 (comment)
astral-sh/ty#2255 (comment)