Skip to content

Issue a warning when assigning something with a mutable field to something with a non-mutable field #45

@cstuartroe

Description

@cstuartroe

The following code does compile, and should compile:

o1 : {foo: var int} = {foo: var 0}

o2 : {foo: int} = o1

o1.foo = 1

o2.foo // 1

However, it's still dangerous. The type checker should issue a warning in this type of scenario.

Similar for arrays or other sequence types.

Metadata

Metadata

Assignees

Labels

refactorIt's not broken, but it's not good either

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions