diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightMethodUtil.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightMethodUtil.java index 97370c856aea..612d4704ec10 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightMethodUtil.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightMethodUtil.java @@ -81,6 +81,7 @@ public class HighlightMethodUtil { String accessModifier = PsiUtil.getAccessModifier(accessLevel); for (MethodSignatureBackedByPsiMethod superMethodSignature : superMethodSignatures) { PsiMethod superMethod = superMethodSignature.getMethod(); + if (method.hasModifierProperty(PsiModifier.ABSTRACT) && !MethodSignatureUtil.isSuperMethod(superMethod, method)) continue; if (!PsiUtil.isAccessible(containingFile.getProject(), superMethod, method, null)) continue; HighlightInfo info = isWeaker(method, modifierList, accessModifier, accessLevel, superMethod, includeRealPositionInfo); if (info != null) return info; diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA67584.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA67584.java new file mode 100644 index 000000000000..e5c5b453abd7 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA67584.java @@ -0,0 +1,11 @@ +abstract class A +{ + abstract void foo(); +} + +interface B +{ + abstract void foo(); +} + +abstract class C extends A implements B { } diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java index 10efbc903bbc..abd6346e24ff 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java @@ -316,6 +316,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase { public void testAmbiguousTypeParamVsConcrete() { doTest5(false); } public void testRawAssignments() throws Exception { doTest5(false); } public void testIDEA87860() throws Exception { doTest5(false); } + public void testIDEA67584() throws Exception { doTest5(false); } public void testJavaUtilCollections_NoVerify() throws Exception { PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));