Closed
Description
This issue was originally filed by Misko.H...@gmail.com
class Foo {
String _foo;
get foo() => _foo;
method() => null;
}
I can closures a method like this
Function method = (new Foo()).method;
This allows me to pass the method closure into callbacks of other API. It is equally useful to pass closure for getter or setter functions. But there is no way to closures the getter/setter. The following code snippet returns a value rather then closurized function.
(new Foo()).method; // returns value rather then function closure which returns a value
Perhaps some other syntax by which I could get a hold of the getter/setter?