PsiType (PsiPolyadicExpressionImpl param) { PsiExpression[] operands = param.getOperands(); PsiType lType = null; IElementType sign = param.getOperationTokenType(); for (int i=1; i<operands.length;i++) { PsiType rType = operands[i].getType(); // 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; if (lType == null) lType = operands[0].getType(); lType = TypeConversionUtil.calcTypeForBinaryExpression(lType, rType, sign, true); } return lType; }