diff --git a/base/abstractarray.jl b/base/abstractarray.jl index d460af2ed1632..3fde6b72ed129 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -738,7 +738,7 @@ function hcat(X::Number...) end function vcat{T}(V::AbstractVector{T}...) - n = 0 + n::Int = 0 for Vk in V n += length(Vk) end diff --git a/test/abstractarray.jl b/test/abstractarray.jl index 58503c6cde14a..bd152586b9abd 100644 --- a/test/abstractarray.jl +++ b/test/abstractarray.jl @@ -452,6 +452,12 @@ function test_vcat_depwarn(::Type{TestAbstractArray}) end end +# Issue 13315 +function test_13315(::Type{TestAbstractArray}) + U = UInt(1):UInt(2) + @test [U;[U;]] == [UInt(1), UInt(2), UInt(1), UInt(2)] +end + #----- run tests -------------------------------------------------------------# for T in (T24Linear, TSlow), shape in ((24,), (2, 12), (2,3,4), (1,2,3,4), (4,3,2,1)) @@ -471,3 +477,4 @@ test_map(TestAbstractArray) test_map_promote(TestAbstractArray) test_UInt_indexing(TestAbstractArray) test_vcat_depwarn(TestAbstractArray) +test_13315(TestAbstractArray)