void () { runWithLanguageLevel( LanguageLevel.getLatest(), () -> doTestByText(""" from typing import Callable, TypeVar T = TypeVar('T') def func(x: T, c: Callable[[T], None]) -> None: pass def accepts_anything(x: str) -> None: pass func(42, <warning descr="Expected type '(int) -> None' (matched generic type '(T) -> None'), got '(x: str) -> None' instead">accepts_anything</warning>)""") ); }