From c233f807b2c9ecb38f3c940d1077c8c4dcbcdab4 Mon Sep 17 00:00:00 2001 From: anna Date: Mon, 19 Nov 2012 21:50:34 +0100 Subject: [PATCH] intersection type flattening: accept raw type --- .../src/com/intellij/psi/PsiIntersectionType.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/java/java-psi-api/src/com/intellij/psi/PsiIntersectionType.java b/java/java-psi-api/src/com/intellij/psi/PsiIntersectionType.java index 0624a9d9eea0..8c13cd7582c6 100644 --- a/java/java-psi-api/src/com/intellij/psi/PsiIntersectionType.java +++ b/java/java-psi-api/src/com/intellij/psi/PsiIntersectionType.java @@ -68,9 +68,12 @@ public class PsiIntersectionType extends PsiType { PsiType type = iterator.next(); for (PsiType existing : array) { - if (type != existing && TypeConversionUtil.isAssignable(type, existing, false)) { - iterator.remove(); - break; + if (type != existing) { + final boolean allowUncheckedConversion = type instanceof PsiClassType && ((PsiClassType)type).isRaw(); + if (TypeConversionUtil.isAssignable(type, existing, allowUncheckedConversion)) { + iterator.remove(); + break; + } } } }