Skip to content

Commit

Permalink
return type assertion with where needs long form
Browse files Browse the repository at this point in the history
  • Loading branch information
ranocha committed Aug 29, 2022
1 parent 0de5fe5 commit 6b218f8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions base/sort.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6b218f8

Please sign in to comment.