wildcards inside: fix for intersection types [^roma]

(cherry picked from commit 6e88ca6de6e921f45f069a34d1e48f5566d362a1)
This commit is contained in:
anna
2013-11-25 16:48:22 +01:00
parent b15fa5dc98
commit 24cd3f09fd
@@ -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;
}
}