Skip to content

Commit eaf2ba6

Browse files
Workaround for has_size Cassette issue (#1051)
* Workaround for has_size Cassette issue * more has_size workaround methods * Update src/convert.jl Co-authored-by: Yuto Horikawa <hyrodium@gmail.com> Co-authored-by: Yuto Horikawa <hyrodium@gmail.com>
1 parent 139df3f commit eaf2ba6

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
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.0"
3+
version = "1.5.1"
44

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

src/convert.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ end
1919
@pure has_eltype(::Type{<:StaticArray}) = false
2020
@pure has_size(::Type{<:StaticArray{S}}) where {S<:Tuple} = @isdefined S
2121
@pure has_size(::Type{<:StaticArray}) = false
22+
# workaround for https://github.com/JuliaArrays/StaticArrays.jl/issues/1047
23+
has_size(::Type{SVector}) = false
24+
has_size(::Type{MVector}) = false
25+
has_size(::Type{SMatrix}) = false
26+
has_size(::Type{MMatrix}) = false
27+
has_size(::Type{SMatrix{N}}) where {N} = false
28+
has_size(::Type{MMatrix{N}}) where {N} = false
29+
2230
@pure has_size1(::Type{<:StaticMatrix{M}}) where {M} = @isdefined M
2331
@pure has_size1(::Type{<:StaticMatrix}) = false
2432
_size1(::Type{<:StaticMatrix{M}}) where {M} = M

0 commit comments

Comments
 (0)