private void generateBinOpChain(PsiPolyadicExpression expression, @NotNull IElementType op, PsiExpression[] operands) {
    PsiExpression lExpr = operands[0];
    lExpr.accept(this);
    PsiType lType = lExpr.getType();
    addImplicitToStringThrows(op, lType);

    for (int i = 1; i < operands.length; i++) {
      PsiExpression rExpr = operands[i];
      PsiType rType = rExpr.getType();

      acceptBinaryRightOperand(op, lExpr, lType, rExpr, rType);
      addImplicitToStringThrows(op, rType);
      PsiType resType = TypeConversionUtil.calcTypeForBinaryExpression(lType, rType, op, true);
      DfaAnchor anchor = i == operands.length - 1 ? new JavaExpressionAnchor(expression) :
                         new JavaPolyadicPartAnchor(expression, i);
      generateBinOp(anchor, op, rExpr, resType);

      lExpr = rExpr;
      lType = resType;
    }
  }
private void generateBinOpChain(PsiPolyadicExpression expression, @NotNull IElementType op, PsiExpression[] operands)