Open
Description
Consider this example:
class P(Protocol[T_co]):
def meth(self) -> P[T_co]: ...
class C(Generic[T]):
def meth(self) -> C[T]: ...
def fun(arg: P[T]) -> T: ...
x: C[int]
reveal_type(f(x)) # I think this should be 'int'
But currently the inferred type is UninhabitedType
, since we don't find any constraints for T
due to a purely structural inference cycle. Unfortunately, it looks like this doesn't have simple solutions.
This is a follow-up for #3132