1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

forceAttrs: make pos mandatory

This commit is contained in:
Kevin Amado 2022-01-21 10:43:16 -05:00
parent 1472e045a7
commit c3896e19d0
No known key found for this signature in database
GPG key ID: FFF341057F503148
8 changed files with 13 additions and 12 deletions

View file

@ -214,7 +214,7 @@ static void import(EvalState & state, const Pos & pos, Value & vPath, Value * vS
if (!vScope)
state.evalFile(path, v);
else {
state.forceAttrs(*vScope);
state.forceAttrs(*vScope, pos);
Env * env = &state.allocEnv(vScope->attrs->size());
env->up = &state.baseEnv;
@ -2485,7 +2485,7 @@ static void prim_zipAttrsWith(EvalState & state, const Pos & pos, Value * * args
for (unsigned int n = 0; n < listSize; ++n) {
Value * vElem = listElems[n];
try {
state.forceAttrs(*vElem);
state.forceAttrs(*vElem, noPos);
for (auto & attr : *vElem->attrs)
attrsSeen[attr.name].first++;
} catch (TypeError & e) {