Closed as not planned
Description
julia> Vector{Union{}}(undef, 1)
1-element Vector{Union{}}:
#undef
Two issues:
-
an array of type
<:AbstractArray{Union{}}
must always be empty (becauseUnion{}
never has instances). So why is the object beingshow
-n as "1-element Vector{Union{}}
"? -
Given that
<:AbstractArray{Union{}}
can never have elements (or, more precisely I guess,iterate
will either returnnothing
or throw), trying to construct such an array with a nonzero length should throw.
The example above is by @tpapp in #52385 (comment)