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