PsiType type = var.getType();
if (!(type instanceof PsiPrimitiveType) || type.equals(PsiType.FLOAT)) return;
if (!type.equals(PsiType.DOUBLE) && !type.equals(PsiType.LONG)) {
type = PsiType.INT;
}
<BUG>operations.add(new StreamApiMigrationInspection.MapOp(addend, tb.getVariable(), type));
final StringBuilder builder = generateStream(iteratedValue, operations);
builder.append(".sum()");</BUG>
replaceWithNumericAddition(project, foreachStatement, var, builder, type);
}

PsiType type = var.getType();
if (!(type instanceof PsiPrimitiveType) || type.equals(PsiType.FLOAT)) return;
if (!type.equals(PsiType.DOUBLE) && !type.equals(PsiType.LONG)) {
type = PsiType.INT;
