Skip to content

Commit 6b218f8

Browse files
committed
return type assertion with where needs long form
1 parent 0de5fe5 commit 6b218f8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

base/sort.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,8 +1486,12 @@ right(::DirectOrdering) = Right()
14861486
left(o::Perm) = Perm(left(o.order), o.data)
14871487
right(o::Perm) = Perm(right(o.order), o.data)
14881488

1489-
lt(::Left, x::T, y::T)::Bool where {T<:Floats} = slt_int(y, x)
1490-
lt(::Right, x::T, y::T)::Bool where {T<:Floats} = slt_int(x, y)
1489+
function lt(::Left, x::T, y::T)::Bool where {T<:Floats}
1490+
slt_int(y, x)
1491+
end
1492+
function lt(::Right, x::T, y::T)::Bool where {T<:Floats}
1493+
slt_int(x, y)
1494+
end
14911495

14921496
uint_map(x::Float16, ::Left) = ~reinterpret(UInt16, x)
14931497
uint_unmap(::Type{Float16}, u::UInt16, ::Left) = reinterpret(Float16, ~u)

0 commit comments

Comments
 (0)