Skip to content

Potentially unintended runtime error in a pattern test #1890

@chloestefantsova

Description

@chloestefantsova

The following lines in the test result in a runtime error.

const c = [[3], [4]];
main() {
var l = [1, 2, for (var [c] in [c]) c, 5];
Expect.listEquals([1, 2, 3, 4, 5], l);

The constant list c that contains two elements is destructed as [c], that is, as a list of one element. That leads to the runtime error.

Metadata

Metadata

Assignees

Labels

bad-testReport tests in need of updates. When closed, the tests should be considered good

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions