diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 6efc9d5f22632..fcea42e369317 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -1732,7 +1732,7 @@ cat_similar(A, ::Type{T}, shape::Vector) where T = Array{T}(undef, shape...) cat_similar(A::Array, ::Type{T}, shape::Tuple) where T = Array{T}(undef, shape) cat_similar(A::Array, ::Type{T}, shape::Vector, ::Val{N}) where {T, N} = Array{T, N}(undef, shape...) cat_similar(A::AbstractArray, T::Type, shape::Tuple) = similar(A, T, shape) -cat_similar(A::AbstractArray, T::Type, shape::Vector, ::Val{N}) = similar(A, T, shape...) +cat_similar(A::AbstractArray, T::Type, shape::Vector, ::Val{N}) where N = similar(A, T, shape...) # These are for backwards compatibility (even though internal) cat_shape(dims, shape::Tuple{Vararg{Int}}) = shape