From 24a987413fd234b994dff27b8a4d4a667ea43667 Mon Sep 17 00:00:00 2001 From: Chris Elrod Date: Sun, 22 Oct 2023 14:49:48 -0400 Subject: [PATCH] `elsize` should be defined on type There is a default `elsize(A::AbstractArray) = elsize(typeof(A))` fallback in `Base`. --- src/ptr_array.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ptr_array.jl b/src/ptr_array.jl index 1f7543f..d200887 100644 --- a/src/ptr_array.jl +++ b/src/ptr_array.jl @@ -485,7 +485,7 @@ end @inline Base.unsafe_convert(::Type{Ptr{T}}, A::AbstractStrideArray) where {T} = Base.unsafe_convert(Ptr{T}, pointer(A)) -@inline Base.elsize(::AbstractStrideArray{T}) where {T} = sizeof(T) +@inline Base.elsize(::Type{<:AbstractStrideArray{T}}) where {T} = sizeof(T) @inline ArrayInterface.static_size(A::AbstractPtrStrideArray) = getfield(A, :sizes)