Skip to content

getindex fails with empty Union{} array #30145

Closed
@simonbyrne

Description

@simonbyrne
julia> X = [1,2,3];

julia> X[Union{}[]]
ERROR: ArgumentError: invalid index: Union{}[] of type Array{Union{},1}
Stacktrace:
 [1] to_index(::Array{Union{},1}) at ./indices.jl:262
 [2] to_index(::Array{Int64,1}, ::Array{Union{},1}) at ./indices.jl:247
 [3] to_indices at ./indices.jl:293 [inlined]
 [4] to_indices at ./indices.jl:290 [inlined]
 [5] getindex(::Array{Int64,1}, ::Array{Union{},1}) at ./abstractarray.jl:905
 [6] top-level scope at none:0

cause of JuliaData/JuliaDB.jl#228

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions