mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
prefer interface as super method when class extends unrelated class and interface (IDEA-99347)
This commit is contained in:
@@ -277,8 +277,8 @@ public class PsiSuperMethodImplUtil {
|
||||
}
|
||||
|
||||
if (containingClass != null) {
|
||||
if (!containingClass.isInterface()) {
|
||||
return true;
|
||||
if (containingClass.isInterface()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!aClass.isInterface() && !InheritanceUtil.isInheritorOrSelf(superClass, containingClass, true)) {
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
interface Errors {
|
||||
java.util.Collection<java.lang.String> getErrorMessages();
|
||||
|
||||
}
|
||||
|
||||
class Test extends AbstrClass implements Errors {
|
||||
}
|
||||
|
||||
|
||||
abstract class AbstrClass {
|
||||
public java.util.Collection getErrorMessages() {return null;}
|
||||
}
|
||||
@@ -202,6 +202,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testIDEA57539() { doTest5(false); }
|
||||
public void testIDEA67570() { doTest5(false); }
|
||||
public void testIDEA99061() { doTest5(false); }
|
||||
public void testIDEA99347() { doTest5(false); }
|
||||
|
||||
public void testJavaUtilCollections_NoVerify() throws Exception {
|
||||
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));
|
||||
|
||||
Reference in New Issue
Block a user