void () { runWithLanguageLevel( LanguageLevel.PYTHON35, () -> doTestByText(""" from typing_extensions import Final def foo1() <warning descr="'Final' could not be used in annotation for a function return value">-> Final[int]</warning>: pass def foo2(): <warning descr="'Final' could not be used in annotation for a function return value"># type: () -> Final[int]</warning> pass""") ); }