From 6b218f8a8b813ed77551ae64f13b15f4b4a8db75 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Mon, 29 Aug 2022 08:32:17 +0200 Subject: [PATCH] return type assertion with where needs long form --- base/sort.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/base/sort.jl b/base/sort.jl index 548eb3b6c7ac0..acb493496ae3e 100644 --- a/base/sort.jl +++ b/base/sort.jl @@ -1486,8 +1486,12 @@ 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)::Bool where {T<:Floats} = slt_int(y, x) -lt(::Right, x::T, y::T)::Bool where {T<:Floats} = slt_int(x, y) +function lt(::Left, x::T, y::T)::Bool where {T<:Floats} + slt_int(y, x) +end +function lt(::Right, x::T, y::T)::Bool where {T<:Floats} + slt_int(x, y) +end uint_map(x::Float16, ::Left) = ~reinterpret(UInt16, x) uint_unmap(::Type{Float16}, u::UInt16, ::Left) = reinterpret(Float16, ~u)