mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
wildcards inside: fix for intersection types [^roma]
(cherry picked from commit 6e88ca6de6e921f45f069a34d1e48f5566d362a1)
This commit is contained in:
@@ -993,16 +993,8 @@ public class TypeConversionUtil {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean containsWildcards(@NotNull PsiType leftBound) {
|
||||
final WildcardDetector wildcardDetector = new WildcardDetector();
|
||||
if (leftBound instanceof PsiIntersectionType) {
|
||||
for (PsiType conjunctType :((PsiIntersectionType)leftBound).getConjuncts()) {
|
||||
if (!conjunctType.accept(wildcardDetector)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return leftBound.accept(wildcardDetector);
|
||||
public static boolean containsWildcards(@NotNull PsiType leftBound) {
|
||||
return leftBound.accept(new WildcardDetector());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -1846,9 +1838,17 @@ public class TypeConversionUtil {
|
||||
return arrayType.getComponentType().accept(this);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Boolean visitIntersectionType(PsiIntersectionType intersectionType) {
|
||||
for (PsiType psiType : intersectionType.getConjuncts()) {
|
||||
if (psiType.accept(this)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean visitType(PsiType type) {
|
||||
//todo intersection types
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user