From 42a32623b64362f89c82e165987ccb8527c213f1 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Tue, 16 Aug 2016 13:39:59 -0400 Subject: [PATCH] fix #18051, allocation in sparse vector getindex Caused by the return type of `ord()` being unknown. (cherry picked from commit b74bc6f38519fbce5ee5359a1f2cdac70b424fc6) ref #18060 --- base/sort.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/base/sort.jl b/base/sort.jl index d388e55f6647c..91e752202c57b 100644 --- a/base/sort.jl +++ b/base/sort.jl @@ -184,6 +184,7 @@ for s in [:searchsortedfirst, :searchsortedlast, :searchsorted] $s(v::AbstractVector, x; lt=isless, by=identity, rev::Bool=false, order::Ordering=Forward) = $s(v,x,ord(lt,by,rev,order)) + $s(v::AbstractVector, x) = $s(v, x, Forward) end end