void () { doTest("str", """ from typing import Generic, TypeVar T1 = TypeVar('T1') T2 = TypeVar('T2') T3 = TypeVar('T3') class Box(Generic[T1]): pass class StrBoxWithExtra(Box[str], Generic[T2]): def __init__(self, extra: T2): self.extra = extra def func(b: Box[T3]) -> T3: pass box = StrBoxWithExtra(42) expr = func(box)"""); }