A recent addition to the typing spec conformance test uncovered a case that pyright is handling incorrectly.
This is found in the overloads_evaluation.py test in this PR.
@overload
def example5(obj: list[int]) -> list[int]: ...
@overload
def example5(obj: list[str]) -> list[str]: ...
def example5(obj: Any) -> list[Any]:
return []
def check_example5(b: list[Any]) -> None:
assert_type(example5(b), Any)