void () { final String prefix = """ from typing_extensions import Literal from typing import overload @overload def foo(p1: Literal["a"]) -> str: ... @overload def foo(p1: Literal["b"]) -> bytes: ... @overload def foo(p1: str) -> int: ... def foo(p1): pass """; runWithLanguageLevel( LanguageLevel.PYTHON36, () -> { doTest("str", prefix + "a: Literal[\"a\"]\n" + "expr = foo(a)"); doTest("int", prefix + "a = \"a\"\n" + "expr = foo(a)"); doTest("str", prefix + "expr = foo(\"a\")"); } ); }