From 51b6d24dfbc64d746cf592595b6532eaa5ca68aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gunnar=20Farneb=C3=83=C2=A4ck?= Date: Fri, 25 Sep 2015 13:57:51 +0200 Subject: [PATCH 1/2] Bugfix in vcat. --- base/abstractarray.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From d5edd1148a9ef9637792bfbb61d6d92e3463d3f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gunnar=20Farneb=C3=83=C2=A4ck?= Date: Fri, 25 Sep 2015 14:39:08 +0200 Subject: [PATCH 2/2] Test case for issue 13315. --- test/abstractarray.jl | 7 +++++++ 1 file changed, 7 insertions(+) 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)