PsiType (PsiBinaryExpressionImpl param) { PsiExpression lOperand = param.getLOperand(); PsiExpression rOperand = param.getROperand(); if (rOperand == null) return null; PsiType rType = rOperand.getType(); IElementType sign = param.getOperationTokenType(); // optimization: if we can calculate type based on right type only PsiType type = TypeConversionUtil.calcTypeForBinaryExpression(null, rType, sign, false); if (type != TypeConversionUtil.NULL_TYPE) return type; PsiType lType = lOperand.getType(); return TypeConversionUtil.calcTypeForBinaryExpression(lType, rType, sign, true); }