Skip to content

Commit

Permalink
Fix Bool ambiguity
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Nov 1, 2023
1 parent e23aa1e commit f185a56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fixed_rational.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f185a56

Please sign in to comment.