MethodError
thrown while preparing to throw InexactError
in conversion of Rational
to Integer
or Complex
to Real
#55756
Labels
complex
Complex numbers
error handling
Handling of exceptions by Julia or the user
error messages
Better, more actionable error messages
rationals
The Rational type and values thereof
Minimal reproducer:
It's not valid to call
nameof
on an arbitrary subtype ofInteger
, because it may be anUnion
:julia/base/rational.jl
Lines 149 to 152 in 945517b
It seems like this could be fixed by simply replacing the
nameof
call with:convert
.The text was updated successfully, but these errors were encountered: