The following code:
class A {
a(x) => x + 1;
}
f(p) => p("A");
main() {
A a = new A();
a.a(1);
print(f(a.a));
}
Fails on the VM with NoSuchMethodException : method not found: '+'.
On dart2js (r10701) the generated JavaScript code does not fail but instead prints "A1".
It is the same issue if an explicit closure is used. like this:
class A {
a(x) => x + 1;
}
f(p) => p("A");
main() {
A a = new A();
a.a(1);
print(f((x) => (a.a(x))));
}