From f185a56a6f072e8dd0ecb4f5f9ee90745a08629c Mon Sep 17 00:00:00 2001 From: MilesCranmer Date: Sun, 22 Oct 2023 20:52:50 +0100 Subject: [PATCH] Fix `Bool` ambiguity --- src/fixed_rational.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fixed_rational.jl b/src/fixed_rational.jl index 04df9805..a6a3313e 100644 --- a/src/fixed_rational.jl +++ b/src/fixed_rational.jl @@ -64,7 +64,7 @@ Rational(x::F) where {F<:FixedRational} = Rational{eltype(F)}(x) isinteger(x) || throw(InexactError(:convert, I, x)) convert(I, div(x.num, denom(F))) end -Bool(x::F) where {F<:FixedRational} = +(::Type{Bool})(x::F) where {F<:FixedRational} = let iszero(x) || isone(x) || throw(InexactError(:convert, Bool, x)) return x.num == denom(F)