void () { doTestByText(""" from typing_extensions import LiteralString def expect_literal_string(s: LiteralString) -> None: ... expect_literal_string("foo" + "bar") literal_string: LiteralString expect_literal_string(literal_string + "bar") literal_string2: LiteralString expect_literal_string(literal_string + literal_string2) plain_string: str expect_literal_string(<warning descr="Expected type 'LiteralString', got 'str' instead">literal_string + plain_string</warning>) expect_literal_string(<warning descr="Expected type 'LiteralString', got 'str' instead">plain_string + literal_string</warning>) """); }