Skip to content

Instantly share code, notes, and snippets.

@mraleph
Created March 25, 2015 21:06
Show Gist options
  • Save mraleph/98da08902093d158f464 to your computer and use it in GitHub Desktop.
Save mraleph/98da08902093d158f464 to your computer and use it in GitHub Desktop.
import 'dart:mirrors';
class Proxy {
static final getName = currentMirrorSystem().getName;
final target;
Proxy(this.target);
noSuchMethod(invocation) {
print("invoking ${invocation.memberName}");
return reflect(target).delegate(invocation);
}
}
main() {
final a = new Proxy(1);
final b = new Proxy(2);
print("$a + $b = ${a + b}");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment