Skip to content

Instantly share code, notes, and snippets.

@back2dos
Created June 17, 2012 18:08
Show Gist options
  • Save back2dos/2945241 to your computer and use it in GitHub Desktop.
Save back2dos/2945241 to your computer and use it in GitHub Desktop.
combine @:forward with @:read/@:prop
package ;
import tink.lang.Cls;
class X implements Cls {
@:read var msg:String = _;
}
class Y implements Cls {
@:forward @:read var x:X = _;
}
class Main {
static function main() {
var y = new Y(new X('foo'));
trace(y.x);
trace([y.x, y.msg]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment