mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
push down: ignore conflicts for static methods on explicit qualifier (IDEA-155641)
This commit is contained in:
@@ -112,6 +112,7 @@ public class PushDownConflicts {
|
||||
}
|
||||
Members:
|
||||
for (PsiMember member : myMovedMembers) {
|
||||
if (member.hasModifierProperty(PsiModifier.STATIC)) continue;
|
||||
for (PsiReference ref : ReferencesSearch.search(member, member.getResolveScope(), false)) {
|
||||
final PsiElement element = ref.getElement();
|
||||
if (element instanceof PsiReferenceExpression) {
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
|
||||
interface I {
|
||||
static void f<caret>oo() {}
|
||||
}
|
||||
|
||||
class C implements I { }
|
||||
|
||||
class Usage {
|
||||
void bar() {
|
||||
I.foo();
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
|
||||
interface I {
|
||||
}
|
||||
|
||||
class C implements I {
|
||||
public static void foo() {}
|
||||
}
|
||||
|
||||
class Usage {
|
||||
void bar() {
|
||||
C.foo();
|
||||
}
|
||||
}
|
||||
@@ -41,6 +41,7 @@ public class PushDownTest extends LightRefactoringTestCase {
|
||||
public void testFieldTypeParameter() { doTest(); }
|
||||
public void testBodyTypeParameter() { doTest(); }
|
||||
public void testDisagreeTypeParameter() { doTest(true); }
|
||||
public void testStaticMethodNoConflictCallingOnQualifier() { doTest(); }
|
||||
public void testFieldAndReferencedClass() { doTest(); }
|
||||
public void testSecondNormalizedField() { doTest(); }
|
||||
public void testFieldAndStaticReferencedClass() { doTest(); }
|
||||
|
||||
Reference in New Issue
Block a user