mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
fix for default overriding abstract: missed substitutor
This commit is contained in:
@@ -502,7 +502,7 @@ public class GenericsHighlightUtil {
|
||||
if (unrelatedMethodContainingClass == null) continue;
|
||||
if (!aClass.hasModifierProperty(PsiModifier.ABSTRACT) && astracts != null && unrelatedMethodContainingClass.isInterface()) {
|
||||
if (defaultMethodContainingClass.isInheritor(unrelatedMethodContainingClass, true) &&
|
||||
MethodSignatureUtil.isSubsignature(unrelatedMethod.getSignature(PsiSubstitutor.EMPTY),
|
||||
MethodSignatureUtil.isSubsignature(unrelatedMethod.getSignature(TypeConversionUtil.getSuperClassSubstitutor(unrelatedMethodContainingClass, defaultMethodContainingClass, PsiSubstitutor.EMPTY)),
|
||||
defaultMethod.getSignature(PsiSubstitutor.EMPTY))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import java.util.function.Consumer;
|
||||
|
||||
class Test {
|
||||
interface IOfInt extends Consumer<Integer> {
|
||||
default void accept(Integer i) {}
|
||||
}
|
||||
|
||||
interface TS<T> extends Consumer<T> {}
|
||||
interface TS1<T> extends TS<T> {}
|
||||
|
||||
class OfInt implements TS<Integer>, IOfInt {}
|
||||
class OfInt1 implements Consumer<Integer>, IOfInt {}
|
||||
class OfInt2 implements TS<Integer>, IOfInt {}
|
||||
}
|
||||
@@ -36,6 +36,7 @@ public class Interface8MethodsHighlightingTest extends LightCodeInsightFixtureTe
|
||||
public void testStaticMethodCalls() { doTest(false, false); }
|
||||
public void testStaticMethodCallsAndOverloadResolution() { doTest(false, false); }
|
||||
public void testDefaultMethodOverrideEquivalentObject() { doTest(false, false); }
|
||||
public void testDefaultMethodOverrideAbstract() { doTest(false, false); }
|
||||
public void testModifierNativeInInterface() { doTest(false, false); }
|
||||
public void testStaticMethods() { doTest(false, false); }
|
||||
public void testFinalStaticDefaultMethods() { doTest(false, false); }
|
||||
|
||||
Reference in New Issue
Block a user