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