class LevelSpec
implements tink.lang.Cls {
@:read var ltype:Int = _; // only works with @:prop, not @:read.
}
class Level
implements tink.lang.Cls {
@:read var index:Int = ;
@:forward( ltype ) var levelSpec:LevelSpec = ;
}
class Test {
public static function main() {
var ls = new LevelSpec( -1 );
var l = new Level( 0, ls );
trace( l.ltype == -1 ); // ./Test.hx:9: characters 4-11 : Method
set_ltype required by property ltype is missing
}
}
class LevelSpec implements tink.lang.Cls { @:read var ltype:Int = _; // only works with @:prop, not @:read. }
class Level implements tink.lang.Cls { @:read var index:Int = ; @:forward( ltype ) var levelSpec:LevelSpec = ; }
class Test { public static function main() { var ls = new LevelSpec( -1 ); var l = new Level( 0, ls ); trace( l.ltype == -1 ); // ./Test.hx:9: characters 4-11 : Method set_ltype required by property ltype is missing } }