Skip to content

Commit

Permalink
Force specialization of dimension_mismatch_fail() on type argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
trahflow committed Feb 20, 2024
1 parent ff8ed9b commit 32b8af3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/convert.jl
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ AbstractArray{T,N}(sa::StaticArray{S,U,N}) where {S,T,U,N} = similar_type(typeof
# Constructing a Tuple from a StaticArray
@inline Tuple(a::StaticArray) = unroll_tuple(a, Length(a))

@noinline function dimension_mismatch_fail(SA::Type, a::AbstractArray)
@noinline function dimension_mismatch_fail(::Type{SA}, a::AbstractArray) where {SA <: StaticArray}

Check warning on line 195 in src/convert.jl

View check run for this annotation

Codecov / codecov/patch

src/convert.jl#L195

Added line #L195 was not covered by tests
throw(DimensionMismatch("expected input array of length $(length(SA)), got length $(length(a))"))
end

Expand Down

0 comments on commit 32b8af3

Please sign in to comment.