mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
no need to check unrelated concrete for same named constructors in the hierarchy (IDEA-154377)
This commit is contained in:
+1
@@ -515,6 +515,7 @@ public class GenericsHighlightUtil {
|
||||
final Map<MethodSignature, PsiMethod> overrideEquivalent = new THashMap<MethodSignature, PsiMethod>(MethodSignatureUtil.METHOD_PARAMETERS_ERASURE_EQUALITY);
|
||||
for (HierarchicalMethodSignature hms : visibleSignatures) {
|
||||
final PsiMethod method = hms.getMethod();
|
||||
if (method.isConstructor()) continue;
|
||||
if (method.hasModifierProperty(PsiModifier.ABSTRACT) || method.hasModifierProperty(PsiModifier.DEFAULT)) continue;
|
||||
if (psiClass.findMethodsBySignature(method, false).length > 0) continue;
|
||||
final PsiClass containingClass = method.getContainingClass();
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import java.util.List;
|
||||
public class A<T> extends p.A {
|
||||
public A(List<T> l) {
|
||||
super(l);
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import java.util.List;
|
||||
public class B extends A<Integer> {
|
||||
public B(List<Integer> a) {
|
||||
super(a);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package p;
|
||||
import java.util.List;
|
||||
|
||||
public class A {
|
||||
public A(List l) {
|
||||
}
|
||||
}
|
||||
+4
@@ -48,4 +48,8 @@ public class AdvHighlighting8Test extends DaemonAnalyzerTestCase {
|
||||
doTest(BASE_PATH + "/IDEA67842/pck/IDEA67842.java", BASE_PATH + "/IDEA67842", false, false);
|
||||
}
|
||||
|
||||
public void testUnrelatedConcreteInConstructors() throws Exception {
|
||||
doTest(BASE_PATH + "/unrelatedConcreteInConstructors/B.java", BASE_PATH + "/unrelatedConcreteInConstructors", false, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user