mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
accept boxing conversion to intersection type (IDEA-129143)
This commit is contained in:
@@ -862,6 +862,14 @@ public class TypeConversionUtil {
|
||||
if (left instanceof PsiPrimitiveType && !PsiType.NULL.equals(left)) {
|
||||
return right instanceof PsiClassType && isAssignable(left, right);
|
||||
}
|
||||
|
||||
if (left instanceof PsiIntersectionType) {
|
||||
for (PsiType lConjunct : ((PsiIntersectionType)left).getConjuncts()) {
|
||||
if (!boxingConversionApplicable(lConjunct, right)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return left instanceof PsiClassType
|
||||
&& right instanceof PsiPrimitiveType
|
||||
&& !PsiType.NULL.equals(right)
|
||||
|
||||
Reference in New Issue
Block a user