Closed
Description
In mypy 0.770 the following typechecks:
from fractions import Fraction
def f(a: Fraction) -> int:
return int(a)
But it raises the following error in mypy 0.790: "error: No overload variant of "int" matches argument type "Fraction""
If I replace the last line with return int(float(a))
, it does typecheck.
Is this intended behaviour?
EDIT: The code above actually also doesn't compile on 0.770, see below on modified code that does work on 0.770 but gives an error on 0.790