void () { doTest("int | str", """ from typing import overload class A: @overload def m(self) -> int: pass @overload def m(self) -> list[int]: pass class B: @overload def m(self) -> str: pass @overload def m(self) -> list[int]: pass inst = A() or B() expr = inst.m() """); }