From bbf1bdeef6b451a4d2e092678953301f8a277961 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Fri, 26 Aug 2022 17:04:40 +0200 Subject: [PATCH] move Bool annotation to definition of lt --- base/sort.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/sort.jl b/base/sort.jl index e69ed8cfa61a01..548eb3b6c7ac0c 100644 --- a/base/sort.jl +++ b/base/sort.jl @@ -519,7 +519,7 @@ function sort!(v::AbstractVector, lo::Integer, hi::Integer, ::InsertionSortAlg, x = v[i] while j > lo y = v[j-1] - if !(lt(o, x, y)::Bool) + if !lt(o, x, y) break end v[j] = y @@ -1486,8 +1486,8 @@ right(::DirectOrdering) = Right() left(o::Perm) = Perm(left(o.order), o.data) right(o::Perm) = Perm(right(o.order), o.data) -lt(::Left, x::T, y::T) where {T<:Floats} = slt_int(y, x) -lt(::Right, x::T, y::T) where {T<:Floats} = slt_int(x, y) +lt(::Left, x::T, y::T)::Bool where {T<:Floats} = slt_int(y, x) +lt(::Right, x::T, y::T)::Bool where {T<:Floats} = slt_int(x, y) uint_map(x::Float16, ::Left) = ~reinterpret(UInt16, x) uint_unmap(::Type{Float16}, u::UInt16, ::Left) = reinterpret(Float16, ~u)