From base/boot.jl:
# commented-out definitions are implemented in C
...
#abstract type AbstractArray{T,N} end
#abstract type DenseArray{T,N} <: AbstractArray{T,N} end
...
#mutable struct Array{T,N} <: DenseArray{T,N}
# ref::MemoryRef{T}
# size::NTuple{N,Int}
#end
So Array
should be a subtype of DenseArray
, and DenseArray
should be abstract, so not a DataType
. But these are apparently not true:
julia> Array{Int,3} isa DenseArray{Int,3}
false
julia> Array{Int,3} isa DenseArray
false
julia> Array isa DenseArray
false
julia> typeof(DenseArray{Int,3})
DataType
Although DenseArray
and DenseArray{Int,3}
have no constructor methods, as we would expect from an abstract type.
Is this a bug, or is there something I’m missing here?