Skip to content

Wrong indices in arrays not starting with 0 #6675

@def-

Description

@def-
let y: array[1..5, int] = [1,2,3,4,5]
echo y[3..5]

Expected output (and old output):

[3,4,5]

Actual output in devel branch:

Traceback (most recent call last)
min.nim(2)               min
system.nim(3496)         []
system.nim(2753)         sysFatal
Error: unhandled exception: index out of bounds [IndexError]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions