From fa6269b0dc5660cbaddb9365c7d89b206fc55992 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Tue, 24 Oct 2023 03:33:06 -0500 Subject: [PATCH] fix h/vcat invoke dispatch arguments (#464) Fixes https://github.com/JuliaLang/julia/issues/51826 (cherry picked from commit 0b36fddcb54e00c7cf92fcb848911464105dc68b) --- src/sparsevector.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sparsevector.jl b/src/sparsevector.jl index 9fc8bec8..b13c44b7 100644 --- a/src/sparsevector.jl +++ b/src/sparsevector.jl @@ -1263,8 +1263,8 @@ _hvcat_rows(::Tuple{}, X::_SparseConcatGroup...) = () # disambiguation for type-piracy problems created above hcat(n1::Number, ns::Vararg{Number}) = invoke(hcat, Tuple{Vararg{Number}}, n1, ns...) vcat(n1::Number, ns::Vararg{Number}) = invoke(vcat, Tuple{Vararg{Number}}, n1, ns...) -hcat(n1::Type{N}, ns::Vararg{N}) where {N<:Number} = invoke(hcat, Tuple{Vararg{Number}}, n1, ns...) -vcat(n1::Type{N}, ns::Vararg{N}) where {N<:Number} = invoke(vcat, Tuple{Vararg{Number}}, n1, ns...) +hcat(n1::N, ns::Vararg{N}) where {N<:Number} = invoke(hcat, Tuple{Vararg{N}}, n1, ns...) +vcat(n1::N, ns::Vararg{N}) where {N<:Number} = invoke(vcat, Tuple{Vararg{N}}, n1, ns...) hvcat(rows::Tuple{Vararg{Int}}, n1::Number, ns::Vararg{Number}) = invoke(hvcat, Tuple{typeof(rows), Vararg{Number}}, rows, n1, ns...) hvcat(rows::Tuple{Vararg{Int}}, n1::N, ns::Vararg{N}) where {N<:Number} = invoke(hvcat, Tuple{typeof(rows), Vararg{N}}, rows, n1, ns...)