Skip to content

Commit a07938e

Browse files
committed
Make DimensionMismatch error string lazy
This appeases `JET.jl` and makes this path testable for trimming with JuliaC.jl.
1 parent c2971e5 commit a07938e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/StaticArraysCore.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ struct SizedArray{S<:Tuple,T,N,M,TData<:AbstractArray{T,M}} <: StaticArray{S,T,N
264264
function SizedArray{S,T,N,M,TData}(a::TData) where {S<:Tuple,T,N,M,TData<:AbstractArray{T,M}}
265265
Base.require_one_based_indexing(a)
266266
if size(a) != size_to_tuple(S) && size(a) != (tuple_prod(S),)
267-
throw(DimensionMismatch("Dimensions $(size(a)) don't match static size $S"))
267+
throw(DimensionMismatch(lazy"Dimensions $(size(a)) don't match static size $S"))
268268
end
269269
return new{S,T,N,M,TData}(a)
270270
end

0 commit comments

Comments
 (0)