Skip to content

Commit b3f3a60

Browse files
committed
Fix methods ambiguities
1 parent 2f062ac commit b3f3a60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/FixedPointDecimals.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,14 @@ end
272272
function Base.round(::Type{FD{T, f}}, x::Rational{Tr}, ::RoundingMode{:Nearest}=RoundNearest) where {T, Tr, f}
273273
reinterpret(FD{T, f}, round(T, x * coefficient(FD{T, f})))
274274
end
275-
function Base.round(::Type{FD{T, f}}, x::Rational{Bool}, ::RoundingMode{:Nearest}=RoundNearest) where {T, f}
276-
reinterpret(FD{T, f}, round(T, x * coefficient(FD{T, f})))
277-
end
278275
else
279276
function Base.round(::Type{FD{T, f}}, x::Rational, ::RoundingMode{:Nearest}=RoundNearest) where {T, f}
280277
reinterpret(FD{T, f}, round(T, x * coefficient(FD{T, f})))
281278
end
282279
end
280+
function Base.round(::Type{FD{T, f}}, x::Rational{Bool}, ::RoundingMode{:Nearest}=RoundNearest) where {T, f}
281+
reinterpret(FD{T, f}, round(T, x * coefficient(FD{T, f})))
282+
end
283283

284284
# conversions and promotions
285285
Base.convert(::Type{FD{T, f}}, x::FD{T, f}) where {T, f} = x # Converting an FD to itself is a no-op

0 commit comments

Comments
 (0)