IDEA-119021 Wrong accessibility warnings when inlining a static class to anonymous

This commit is contained in:
Anna Kozlova
2014-01-09 16:13:24 +01:00
parent 3ee557a91b
commit fbb0fd6132
4 changed files with 39 additions and 0 deletions
@@ -0,0 +1,17 @@
class A {
protected int i;
}
class B extends A {}
class C {
C() {
B d = new D();
}
static class <caret>D extends B {
D() {
System.out.println(i);
}
}
}
@@ -0,0 +1,16 @@
class A {
protected int i;
}
class B extends A {}
class C {
C() {
B d = new B() {
{
System.out.println(i);
}
};
}
}
@@ -231,6 +231,10 @@ public class InlineToAnonymousClassTest extends LightRefactoringTestCase {
public void testBraces() throws Exception {
doTest(false, false);
}
public void testAvailableInSupers() throws Exception {
doTest(false, false);
}
public void testNoInlineAbstract() throws Exception {
doTestNoInline("Abstract classes cannot be inlined");