Skip to content

Shouldn't be able to index an array with a length #7456

@jtran

Description

@jtran

This sets x to 1, but this should be an error.

a = [0, 1, 2]
x = a[1mm]

The index should require a Count, so 1_. Since Default auto-coerces to Count, a bare literal like 1 would also work.

Metadata

Metadata

Assignees

Labels

kclLanguage and compiler features

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions