mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
unrelated defaults: don't check type parameters
This commit is contained in:
+1
@@ -442,6 +442,7 @@ public class GenericsHighlightUtil {
|
||||
|
||||
static HighlightInfo checkUnrelatedDefaultMethods(@NotNull PsiClass aClass,
|
||||
@NotNull PsiIdentifier classIdentifier) {
|
||||
if (aClass instanceof PsiTypeParameter) return null;
|
||||
final Map<MethodSignature, Set<PsiMethod>> overrideEquivalent =
|
||||
new THashMap<MethodSignature, Set<PsiMethod>>(MethodSignatureUtil.METHOD_PARAMETERS_ERASURE_EQUALITY);
|
||||
PsiClass[] supers = aClass.getSupers();
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
|
||||
interface A {
|
||||
default void f(){}
|
||||
}
|
||||
interface B extends A {
|
||||
void f();
|
||||
}
|
||||
interface C extends A {}
|
||||
interface D extends C {}
|
||||
|
||||
class U {
|
||||
<T extends B & C> void m (){}
|
||||
<T extends B & D> void m1(){}
|
||||
}
|
||||
+4
@@ -62,6 +62,10 @@ public class Interface8MethodsHighlightingTest extends LightCodeInsightFixtureTe
|
||||
doTest(false, false);
|
||||
}
|
||||
|
||||
public void testUnrelatedDefaultsWithTypeParameter() throws Exception {
|
||||
doTest(false, false);
|
||||
}
|
||||
|
||||
public void testStaticMethodAccessibleBothThroughStaticImportAndInheritance() throws Exception {
|
||||
myFixture.addClass("package p; public interface Foo {" +
|
||||
" static void foo() {}" +
|
||||
|
||||
Reference in New Issue
Block a user