The results of type checking the following fragment are unexpected:
from typing import Any, overload, Union
@overload
def f(x: int) -> int: ...
@overload
def f(x: Union[int, float]) -> float: ...
def f(x): pass
@overload
def g(x: int) -> int: ...
@overload
def g(x: float) -> float: ...
def g(x): pass
a: Any
reveal_type(f(a)) # Any <--- okay
reveal_type(g(a)) # int <--- unexpected
The correct result would arguably be Any for both of the calls. Union[int, float] should be equivalent to just float.
This seems to interact with the result type of os.path.join in Python 2 mode with #3300.