void () { doTest("str", """ from typing import TypeVar, Generic T = TypeVar('T', covariant=True) class C(Generic[T]): def __init__(self, foo: T): self.foo = foo def f() -> C[str]: return C('test') x = f() expr = x.foo """); }