Skip to content

Commit

Permalink
Revert the accidentally breaking part of 33779 (#33925)
Browse files Browse the repository at this point in the history
A one-line change introduced in 33779 seems to have inadvertently
caused the regression noted in 33919. Reverting just that part should
fix it.
  • Loading branch information
ararslan authored and KristofferC committed Apr 11, 2020
1 parent 2ea0375 commit 9f9a626
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,7 @@ function hcat(V::Vector{T}...) where T
throw(DimensionMismatch("vectors must have same lengths"))
end
end
return T[ V[j][i] for i=1:length(V[1]), j=1:length(V) ]
return [ V[j][i]::T for i=1:length(V[1]), j=1:length(V) ]
end

function vcat(arrays::Vector{T}...) where T
Expand Down
7 changes: 7 additions & 0 deletions test/arrayops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2650,3 +2650,10 @@ end

# Throws ArgumentError for negative dimensions in Array
@test_throws ArgumentError fill('a', -10)

@testset "Issue 33919" begin
A = Array[rand(2, 3), rand(3, 1)]
B = Array[rand(2, 2), rand(1, 4)]
C = hcat(A, B)
@test typeof(C) == Array{Array{Float64,2},2}
end

0 comments on commit 9f9a626

Please sign in to comment.