boolean (PsiType lType, PsiType rType, IElementType opType) { if (lType == null || rType == null) { return false; } if (!TypeConversionUtil.isNumericType(lType) || !TypeConversionUtil.isNumericType(rType)) { return false; } if (opType == JavaTokenType.EQEQ || opType == JavaTokenType.NE) { if (PsiTypes.nullType().equals(lType) || PsiTypes.nullType().equals(rType)) { return false; } if (lType instanceof PsiClassType && rType instanceof PsiClassType) { return false; } if (lType instanceof PsiClassType) { return PsiPrimitiveType.getUnboxedType(lType) != null; // should be unboxable } if (rType instanceof PsiClassType) { return PsiPrimitiveType.getUnboxedType(rType) != null; // should be unboxable } return true; } return opType == JavaTokenType.ASTERISK || opType == JavaTokenType.DIV || opType == JavaTokenType.PERC || opType == JavaTokenType.PLUS || opType == JavaTokenType.MINUS || opType == JavaTokenType.LT || opType == JavaTokenType.LE || opType == JavaTokenType.GT || opType == JavaTokenType.GE || opType == JavaTokenType.AND || opType == JavaTokenType.XOR || opType == JavaTokenType.OR; }