From 0b36fddcb54e00c7cf92fcb848911464105dc68b 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 --- src/sparsevector.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sparsevector.jl b/src/sparsevector.jl index 45034b9f..f1fd7f15 100644 --- a/src/sparsevector.jl +++ b/src/sparsevector.jl @@ -1296,8 +1296,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...)