boolean (final PsiType left, final PsiType right) { if (left instanceof PsiPrimitiveType && !PsiTypes.nullType().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 && !PsiTypes.nullType().equals(right) && isAssignable(left, right); }