Skip to content

Commit

Permalink
builtins.concatMap: Fix typo in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
nbraud committed Nov 19, 2023
1 parent c4a74d6 commit d592808
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libexpr/primops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3459,7 +3459,7 @@ static void prim_concatMap(EvalState & state, const PosIdx pos, Value * * args,
for (unsigned int n = 0; n < nrLists; ++n) {
Value * vElem = args[1]->listElems()[n];
state.callFunction(*args[0], *vElem, lists[n], pos);
state.forceList(lists[n], lists[n].determinePos(args[0]->determinePos(pos)), "while evaluating the return value of the function passed to buitlins.concatMap");
state.forceList(lists[n], lists[n].determinePos(args[0]->determinePos(pos)), "while evaluating the return value of the function passed to builtins.concatMap");
len += lists[n].listSize();
}

Expand Down
4 changes: 2 additions & 2 deletions src/libexpr/tests/error_traces.cc
Original file line number Diff line number Diff line change
Expand Up @@ -906,12 +906,12 @@ namespace nix {
ASSERT_TRACE2("concatMap (x: 1) [ \"foo\" ] # TODO",
TypeError,
hintfmt("value is %s while a list was expected", "an integer"),
hintfmt("while evaluating the return value of the function passed to buitlins.concatMap"));
hintfmt("while evaluating the return value of the function passed to builtins.concatMap"));

ASSERT_TRACE2("concatMap (x: \"foo\") [ 1 2 ] # TODO",
TypeError,
hintfmt("value is %s while a list was expected", "a string"),
hintfmt("while evaluating the return value of the function passed to buitlins.concatMap"));
hintfmt("while evaluating the return value of the function passed to builtins.concatMap"));

}

Expand Down

0 comments on commit d592808

Please sign in to comment.