Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Main
- {
- public static function main()
- {
- var a = new Test();
- var b = new Test();
- b.test();//works as expected :Cannot access to private field test
- a.check(b);
- }
- }
- class Test
- {
- public function new()
- {
- }
- public function check(b:Test):Void
- {
- b.test();//does NOT work as expected: b suddenly has access to private field test
- }
- private function test():Void
- {
- trace("hello");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment