mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-217978 Failure of resolving DGM methods on bounded type parameters
GitOrigin-RevId: badb61f5dfbbc8b4100ce9b50e0ba6fcb21d270b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
226dc36006
commit
535f06f5cd
+4
-2
@@ -262,8 +262,10 @@ public class ResolveUtil {
|
||||
private static void collectSuperTypes(PsiType type, Set<? super String> visited, Project project) {
|
||||
String qName = rawCanonicalText(type);
|
||||
|
||||
if (!visited.add(qName)) {
|
||||
return;
|
||||
if (!(type instanceof PsiClassType && ((PsiClassType)type).resolve() instanceof PsiTypeParameter)) {
|
||||
if (!visited.add(qName)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
final PsiType[] superTypes = type.getSuperTypes();
|
||||
|
||||
@@ -2376,4 +2376,13 @@ def foo(Object[] o) {}
|
||||
''', GrMethod
|
||||
assert method.parameterList.parameters.first().type.equalsToText('java.util.List')
|
||||
}
|
||||
|
||||
void 'test IDEA-217978'() {
|
||||
def method = resolveByText '''\
|
||||
def <T extends List<Integer>> void foo(T a) {
|
||||
a.eve<caret>ry {true}
|
||||
}
|
||||
''', GrGdkMethod
|
||||
assert method.staticMethod.name == "every"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user