void () { doTest("int", """ from typing import Generic, Protocol, TypeVar\s T1 = TypeVar('T1') T2 = TypeVar('T2') class Fooable(Protocol[T1]): def foo(self) -> T1: ... class MyClass(Generic[T2]): def foo(self) -> T2: ... def f(x: Fooable[T1]) -> T1: ... obj: MyClass[int] expr = f(obj)"""); }