Skip to content

InvocationMirror.invokeOn does not work for getters and setters on dart2js. #6907

Closed
@mraleph

Description

@mraleph

It works fine with normal methods but not with getters and setters:

class A {
  set x(val) {
    print("A.x <- $val");
  }
  
  get x {
    print("<- A.x");
  }
}

class B {
  final a = new A();
  noSuchMethod(mirror) => mirror.invokeOn(a);
}

main () {
  var b = new B();
  print('before set x');
  b.x = 10;
  print('before get x');
  b.x;
}

explodes.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions