void () { runWithLanguageLevel( LanguageLevel.getLatest(), () -> doTestByText(""" from typing import Iterable, TypeVar, Generic T = TypeVar("T") class MyClass(Generic[T]): def __init__(self, data: Iterable[T]): sorted(data, key=self.my_func) def my_func(self, elem: T) -> int: pass""") ); }