From 065c77fb1ed367efe3d69a38ffe777c595189a26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20H=C3=A4cker?= Date: Thu, 29 Oct 2026 17:35:37 +0100 Subject: [PATCH 1/2] Fix accidental definition `tuple_svec(::Type{Union{}})` JET complains about it and it is correct: `Bottom` is `<:Tuple` and it does not have a field `parameters`. --- src/StaticArraysCore.jl | 1 + test/runtests.jl | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/StaticArraysCore.jl b/src/StaticArraysCore.jl index 66d3d06..76318b4 100644 --- a/src/StaticArraysCore.jl +++ b/src/StaticArraysCore.jl @@ -56,6 +56,7 @@ tuple_prod(T::Tuple) = prod(T) tuple_minimum(T::Tuple) = minimum(T) tuple_svec(::Type{T}) where {T<:Tuple} = T.parameters +tuple_svec(::Type{Union{}}) = throw(ArgumentError("Union{} is not a tuple type")) # Julia `Base` provides a function for this purpose since v1.1: `fieldtypes`. # We don't use it yet, though, because it wrecks type inference with Julia diff --git a/test/runtests.jl b/test/runtests.jl index 0a753e8..44c0301 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -22,6 +22,12 @@ using StaticArraysCore, Test @test StaticArraysCore.tuple_length((5, 3)) == 2 @test StaticArraysCore.tuple_prod((5, 3)) == 15 @test StaticArraysCore.tuple_minimum((5, 3)) == 3 + @test Tuple(StaticArraysCore.tuple_svec(Tuple{})) === () + @test Tuple(StaticArraysCore.tuple_svec(Tuple{5,3})) === (5, 3) + @test Tuple(StaticArraysCore.tuple_svec(Tuple{Int,Float64})) === (Int, Float64) + @test_throws ArgumentError StaticArraysCore.tuple_svec(Union{}) + @test_throws ArgumentError StaticArraysCore.tuple_tuple(Union{}) + @test_throws ArgumentError StaticArraysCore.size_to_tuple(Union{}) @test StaticArraysCore.StaticArrayStyle{1}(Val(2)) === StaticArraysCore.StaticArrayStyle{2}() end From f3ddc62f83bf9bee5d224595ac5b4275cca73d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20H=C3=A4cker?= <152268010+PatrickHaecker@users.noreply.github.com> Date: Sat, 7 Nov 2026 10:20:55 +0100 Subject: [PATCH 2/2] Bump version from 1.4.4 to 1.4.5 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 5844f12..da7bca5 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "StaticArraysCore" uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.4" +version = "1.4.5" [compat] julia = "1.6"