Skip to content

Commit 4f88ad6

Browse files
jnthntatumcopybara-github
authored andcommitted
Update extension sortBy macro to use the configured name for accumulator variable instead of a constant '__result__'.
PiperOrigin-RevId: 721488241
1 parent ee1b4db commit 4f88ad6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/lists_functions.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ absl::optional<Expr> MakeMapComprehension(MacroExprFactory& factory,
347347
factory.NewList(factory.NewListElement(std::move(map_expr))));
348348
auto var_name = var_ident.ident_expr().name();
349349
return factory.NewComprehension(std::move(var_name), std::move(target),
350-
kAccumulatorVariableName, factory.NewList(),
350+
factory.AccuVarName(), factory.NewList(),
351351
factory.NewBoolConst(true), std::move(step),
352352
factory.NewAccuIdent());
353353
}

0 commit comments

Comments
 (0)