Skip to content

Incorrect setter parameter list does not cause any complaints from dart2js #4870

Closed
@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


The following code behaves strangely in dart2js:

void main() {
  var foo = new Foo();
  foo.element = 'parrots!';
}

class Foo {
  void set element() {
    print('setting');
  }
}

Presumably there should be a compile-time error objecting to the illegal setter parameters, but I get neither a compile-time error nor a run-time error. The VM gives what appears to be a compile-time error.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions