diff --git a/src/vector_of_array.jl b/src/vector_of_array.jl index af4da6e9..0ca19a09 100644 --- a/src/vector_of_array.jl +++ b/src/vector_of_array.jl @@ -1162,6 +1162,16 @@ end ) where {T} return similar(Array{T}, dims) end +# On Julia versions where Base.similar(::AbstractArray, ::Type, ::Tuple{Integer, +# Vararg{Integer}}) still exists (removed upstream in 1.12), that method and the +# one above are each more specific than the other in one argument position, +# which Aqua reports as an ambiguity. Pin down the Integer-only intersection +# explicitly, mirroring the equivalent pair of methods Base itself defines. +@inline function Base.similar( + VA::AbstractVectorOfArray, ::Type{T}, dims::Tuple{Integer, Vararg{Integer}} + ) where {T} + return similar(Array{T}, dims) +end # fill!