diff --git a/base/array.jl b/base/array.jl index 4eba2f531ad78..8cbdbdeebff37 100644 --- a/base/array.jl +++ b/base/array.jl @@ -288,8 +288,8 @@ else _default_eltype(itr::ANY) = Any end -_array_for(T, itr, ::HasLength) = Array{T,1}(Int(length(itr)::Integer)) -_array_for(T, itr, ::HasShape) = similar(Array{T}, indices(itr)) +_array_for{T}(::Type{T}, itr, ::HasLength) = Array{T,1}(Int(length(itr)::Integer)) +_array_for{T}(::Type{T}, itr, ::HasShape) = similar(Array{T}, indices(itr)) function collect(itr::Generator) isz = iteratorsize(itr.iter)