Skip to content

Commit b4e49ce

Browse files
authored
Avoid runtime static parameters inference during dynamic dispatch of SVector{k} (#1157)
* Avoid dynamic dispatch with `SVector{k}` * v1.5.22 * v1.5.23
1 parent ed92217 commit b4e49ce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "StaticArrays"
22
uuid = "90137ffa-7385-5640-81b9-e52037218182"
3-
version = "1.5.22"
3+
version = "1.5.23"
44

55
[deps]
66
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

src/convert.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ end
166166
SA′ = construct_type(SA, sa)
167167
need_rewrap(SA′, sa) ? SA′((sa,)) : SA′(Tuple(sa))
168168
end
169-
@propagate_inbounds (::Type{SA})(a::AbstractArray) where {SA <: StaticArray} = convert(SA, a)
169+
@propagate_inbounds (T::Type{<:StaticArray})(a::AbstractArray) = convert(T, a)
170170

171171
# this covers most conversions and "statically-sized reshapes"
172172
@inline function convert(::Type{SA}, sa::StaticArray{S}) where {SA<:StaticArray,S<:Tuple}

0 commit comments

Comments
 (0)