Closed
Description
def add_value(a: Union[float, int], b: Union[float, int]) -> Union[float, int]:
return a + b
Results in:
error: Unsupported operand types for + ("Union[float, int]" and "int")
Interestingly both
def add_value(a: Union[float, int], b: float) -> Union[float, int]:
return a + b
and
def add_value(a: int, b: Union[float, int]) -> Union[float, int]:
return a + b
work fine