We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Bool
1 parent 09d107a commit 468892eCopy full SHA for 468892e
src/fixed_rational.jl
@@ -64,7 +64,7 @@ Rational(x::F) where {F<:FixedRational} = Rational{eltype(F)}(x)
64
isinteger(x) || throw(InexactError(:convert, I, x))
65
convert(I, div(x.num, denom(F)))
66
end
67
-Bool(x::F) where {F<:FixedRational} =
+(::Type{Bool})(x::F) where {F<:FixedRational} =
68
let
69
iszero(x) || isone(x) || throw(InexactError(:convert, Bool, x))
70
return x.num == denom(F)
0 commit comments