Skip to content

1[1:1] should work #47166

@StefanKarpinski

Description

@StefanKarpinski

Reported here: https://discourse.julialang.org/t/indexing-a-number/88735. My reasoning is that fill(1)[1:1] works so 1[1:1] should produce the same thing:

julia> fill(1)[1:1]
1-element Vector{Int64}:
 1

julia> 1[1:1]
ERROR: MethodError: no method matching getindex(::Int64, ::UnitRange{Int64})

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