void () { runWithLanguageLevel( LanguageLevel.PYTHON35, () -> { doTest("int", "from typing_extensions import Final\n" + "expr: Final[int] = undefined"); doTest("int", "from typing_extensions import Final\n" + "expr: Final = 5"); doTest("int", "from typing_extensions import Final\n" + "expr: Final[int]"); } ); doTest("int", "from typing_extensions import Final\n" + "expr = undefined # type: Final[int]"); doTest("int", "from typing_extensions import Final\n" + "expr = 5 # type: Final"); }