Guest User

Untitled

a guest
Aug 2nd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package ;
  2. import flash.display.MovieClip;
  3. class Main
  4. {
  5.     public static function main()
  6.     {
  7.         var foo = new Foo();
  8.         //trace(foo.bar); //Foo has no field bar
  9.         trace(Reflect.field(foo,"bar"));//7
  10.     }
  11. }
  12. class Foo
  13. {
  14.     //public var bar:Int;//corrupted abc
  15.     public function new(){}
  16.     @:getter(bar) function getBar() return 7
  17. }
Add Comment
Please, Sign In to add comment