mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
avoid creating intersections from unresolved classes
GitOrigin-RevId: 3df59f4427f120185f8da6744500530402fbbfc0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1da08c1dad
commit
f0a1247707
+3
-2
@@ -98,7 +98,8 @@ fun PsiType.forceWildcardsAsTypeArguments(): PsiType {
|
||||
val resolvedClass = classType.resolve()
|
||||
if (resolvedClass != null) {
|
||||
return factory.createType(resolvedClass, *mappedParameters.toTypedArray())
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return PsiWildcardType.createUnbounded(manager)
|
||||
}
|
||||
}
|
||||
@@ -243,7 +244,7 @@ fun PsiSubstitutor.removeForeignTypeParameters(method: GrMethod): PsiSubstitutor
|
||||
}
|
||||
|
||||
override fun visitIntersectionType(intersectionType: PsiIntersectionType?): PsiType? {
|
||||
return compress(intersectionType?.conjuncts?.filterNotNull()?.map { it.accept(this) })
|
||||
return compress(intersectionType?.conjuncts?.filterNotNull()?.mapNotNull { it.accept(this) })
|
||||
}
|
||||
|
||||
override fun visitWildcardType(wildcardType: PsiWildcardType?): PsiType? {
|
||||
|
||||
+3
@@ -517,4 +517,7 @@ class AA { static void fo<caret>o(Integer a) {} }
|
||||
doTest(true)
|
||||
}
|
||||
|
||||
void testUnresolvedCode2() {
|
||||
doTest(true)
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
def foo(a) {
|
||||
|
||||
}
|
||||
|
||||
def <T extends Serializable & Unresolved> void m() {
|
||||
foo(null as T)
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
void foo(Object a) {
|
||||
|
||||
}
|
||||
|
||||
def <T extends Serializable & Unresolved> void m() {
|
||||
foo(null as T)
|
||||
}
|
||||
Reference in New Issue
Block a user