Skip to content

Unexpected behavior with unassigned typed things #239

@joente

Description

@joente

Describe the bug
As a user I would expect the following code to result in an error as arr is restricted to int values.

set_type('T', {arr: '[int]'});
T{}.arr.push('test');  

This code however, does not raise and error. This happens because T{} is removed before the .push(..) functions is called.

To Reproduce
The code in the bug description shows how to reproduce this bug.

Expected behavior
The example code is expected to raise a type_err.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions