Skip to content

Commit 812c917

Browse files
committed
Fix a mistake
1 parent 71e8fa1 commit 812c917

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/sort.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,8 @@ function _sort!(v::AbstractVector, a::MissingOptimization, o::Ordering, kw)
573573
if nonmissingtype(eltype(v)) != eltype(v) && o isa DirectOrdering
574574
lo, hi = send_to_end!(ismissing, v, o; lo, hi)
575575
_sort!(WithoutMissingVector(v, unsafe=true), a.next, o, (;kw..., lo, hi))
576-
elseif eltype(v) <: Integer && nonmissingtype(eltype(o.data)) != eltype(o.data) &&
577-
(o isa Perm{DirectOrdering} || o isa PermUnstable{DirectOrdering})
576+
elseif eltype(v) <: Integer && (o isa Perm{DirectOrdering} || o isa PermUnstable{DirectOrdering}) &&
577+
nonmissingtype(eltype(o.data)) != eltype(o.data)
578578
PermT = o isa Perm{DirectOrdering} ? Perm : PermUnstable
579579
lo, hi = send_to_end!(i -> ismissing(@inbounds o.data[i]), v, o)
580580
_sort!(v, a.next, PermT(o.order, WithoutMissingVector(o.data, unsafe=true)), (;kw..., lo, hi))

0 commit comments

Comments
 (0)