From 4affae3adaa01f3500c2012714ac493a4620278c Mon Sep 17 00:00:00 2001 From: Miles Lubin Date: Fri, 13 Nov 2015 12:44:29 -0500 Subject: [PATCH] Fix type instability in push! (cherry picked from commit c017f2486068dfb6c59232e208a2b961c35332a3) ref #13977 --- base/array.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/array.jl b/base/array.jl index 51ffb9e055735..4b0d387847cd3 100644 --- a/base/array.jl +++ b/base/array.jl @@ -429,9 +429,9 @@ end function push!{T}(a::Array{T,1}, item) # convert first so we don't grow the array if the assignment won't work - item = convert(T, item) + itemT = convert(T, item) ccall(:jl_array_grow_end, Void, (Any, UInt), a, 1) - a[end] = item + a[end] = itemT return a end