mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
IDEA-119021 Wrong accessibility warnings when inlining a static class to anonymous
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
class A {
|
||||
protected int i;
|
||||
}
|
||||
|
||||
class B extends A {}
|
||||
|
||||
class C {
|
||||
C() {
|
||||
B d = new B() {
|
||||
{
|
||||
System.out.println(i);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
+4
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user