accessibility of private method via anonymous classes fixed

This commit is contained in:
Anna Kozlova
2014-05-22 20:45:56 +04:00
parent e43dbe0120
commit 5953b8fb0d
2 changed files with 10 additions and 3 deletions
@@ -37,7 +37,7 @@ abstract class EnumPrivateMethodTest2 {
private void firstMethod() {}
}
class Test {
class TestAnonymousContainer {
private class Foo {
private Foo() {}
@@ -45,4 +45,12 @@ class Test {
new Foo(){};
}
}
class AB {
private void foo(){}
}
{
new AB() {}.<error descr="'foo()' has private access in 'TestAnonymousContainer.AB'">foo</error>();
}
}