Closed
Description
I don't understand why this function definition seems prohibited (running with --depwarn=error
):
julia> struct CenterIndexedArray{T,N,A<:AbstractArray} <: AbstractArray{T,N}
data::A
halfsize::NTuple{N,Int}
function CenterIndexedArray{T,N,A}(data::A) where {T,N,A<:AbstractArray}
new{T,N,A}(data, _halfsize(data))
end
end
julia> CenterIndexedArray(A::AbstractArray{T,N}) where {T,N} = CenterIndexedArray{T,N,typeof(A)}(A)
CenterIndexedArray
julia> CenterIndexedArray{T,N}(::UndefInitializer, sz::Vararg{<:Integer,N}) where {T,N} =
CenterIndexedArray(Array{T,N}(undef, sz...))
ERROR: Wrapping `Vararg` directly in UnionAll is deprecated (wrap the tuple instead).
Stacktrace:
[1] UnionAll(v::TypeVar, t::Any)
@ Core ./boot.jl:257
[2] top-level scope
@ REPL[3]:1
Metadata
Metadata
Assignees
Labels
No labels