void () { runWithLanguageLevel( LanguageLevel.getLatest(), () -> doTestByText( """ from typing import TypeVar, Mapping MyKT = TypeVar("MyKT") MyVT = TypeVar("MyVT") class MyMapping(Mapping[MyKT, MyVT]): pass d: MyMapping[str, str] = undefined1 d.get(undefined2) d.get("str") d.get(<warning descr="Expected type 'str' (matched generic type '_KT'), got 'int' instead">1</warning>)""" ) ); }