Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import haxe.rtti.Meta;
- using Reflect;
- class Foo
- {
- @test
- public var bar:String;
- }
- class Main
- {
- public static function main()
- {
- var meta = Meta.getFields(Foo);
- var fields = Reflect.fields(meta); //OK
- for(f in fields) //OK
- trace(f);
- var fields = meta.fields();//Runtime error: fields is not a function
- for(f in fields) //Compiler error : You can't iterate on a Dynamic value
- trace(f);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment