Skip to content

Commit 8b88e3b

Browse files
authored
delete unnecessary abstract type in Base.Rounding (#53093)
1 parent 88218c6 commit 8b88e3b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

base/rounding.jl

+4-5
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,14 @@ rounds_away_from_zero(t::Tuple{Any,Bool}) = rounds_away_from_zero(t...)
131131
tie_breaker_is_to_even(t::Tuple{Any,Bool}) = tie_breaker_is_to_even(first(t))
132132
tie_breaker_rounds_away_from_zero(t::Tuple{Any,Bool}) = tie_breaker_rounds_away_from_zero(t...)
133133

134-
abstract type RoundingIncrementHelper end
135-
struct FinalBit <: RoundingIncrementHelper end
136-
struct RoundBit <: RoundingIncrementHelper end
137-
struct StickyBit <: RoundingIncrementHelper end
134+
struct FinalBit end
135+
struct RoundBit end
136+
struct StickyBit end
138137

139138
function correct_rounding_requires_increment(x, rounding_mode, sign_bit::Bool)
140139
r = (rounding_mode, sign_bit)
141140
f = let y = x
142-
(z::RoundingIncrementHelper) -> y(z)::Bool
141+
(z::Union{FinalBit,RoundBit,StickyBit}) -> y(z)::Bool
143142
end
144143
if rounds_to_nearest(r)
145144
if f(RoundBit())

0 commit comments

Comments
 (0)