mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inline super class: rebind forward references when it's target inner class is moved (IDEA-197170)
This commit is contained in:
+3
-1
@@ -516,7 +516,9 @@ public class JavaPushDownDelegate extends PushDownDelegate<MemberInfo, PsiMember
|
||||
psiClass = targetClass;
|
||||
} else if (psiClass.getContainingClass() == sourceClass) {
|
||||
psiClass = targetClass.findInnerClassByName(psiClass.getName(), false);
|
||||
LOG.assertTrue(psiClass != null);
|
||||
if (psiClass == null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(qualifier instanceof PsiThisExpression) && !(qualifier instanceof PsiSuperExpression) && ref instanceof PsiReferenceExpression) {
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
class Test {
|
||||
public Test() {
|
||||
}
|
||||
|
||||
private static class Inner1 {
|
||||
Inner2 dummy = Inner2.DUMMY;
|
||||
}
|
||||
|
||||
private static class Inner2 {
|
||||
|
||||
public static final Inner2 DUMMY = new Inner2();
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
class Super {
|
||||
private static class Inner1 {
|
||||
Inner2 dummy = Inner2.DUMMY;
|
||||
}
|
||||
|
||||
private static class Inner2 {
|
||||
|
||||
public static final Inner2 DUMMY = new Inner2();
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
class Test extends Super{
|
||||
public Test() {
|
||||
}
|
||||
}
|
||||
@@ -83,6 +83,7 @@ public class InlineSuperClassTest extends MultiFileTestCase {
|
||||
doTest(false, true);
|
||||
}
|
||||
public void testThisQualificationInsideAnonymous() { doTest(); }
|
||||
public void testOrderOfInnerClasses() { doTest(); }
|
||||
|
||||
private void doTest() {
|
||||
doTest(false, false);
|
||||
|
||||
Reference in New Issue
Block a user