Nested parametric type?

mutable struct Node{N, T, D<:Data{N,T}}
    center::SVector{N,T}
    p::Union{D, Nothing}
    child::Union{Array{Node{N,T},1}, Nothing}
end

might be what you want.

2 Likes