Closed
Description
It is happenening with the lastest version and 0.14
as well:
Failing code:
from returns.io import IO
from returns.curry import curry
@curry
def fails(a1: int, a2: str, a3: str) -> str:
return str(a1) + a2 + a3
def works(arg: int) -> str:
...
reveal_type(IO(1).apply(IO(works)))
reveal_type(IO(1).apply(IO(fails)))
Output:
» mypy ex.py
ex.py:20: note: Revealed type is 'returns.io.IO[builtins.str*]'
ex.py:21: note: Revealed type is 'returns.io.IO[Overload(def (a2: builtins.str, a3: builtins.str) -> builtins.str, def (a2: builtins.str) -> def (a3: builtins.str) -> builtins.str)]'
ex.py:21: error: Argument 1 to "IO" has incompatible type overloaded function; expected overloaded function