1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

forceValue: make pos mandatory

- Make passing the position to `forceValue` mandatory,
  this way we remember people that the position is
  important for better error messages
- Add pos to all `forceValue` calls
This commit is contained in:
Kevin Amado 2021-11-27 12:40:24 -05:00
parent 5f08db69d1
commit 49b0bb0206
No known key found for this signature in database
GPG key ID: FFF341057F503148
12 changed files with 28 additions and 26 deletions

View file

@ -58,7 +58,7 @@ std::pair<Value *, Pos> findAlongAttrPath(EvalState & state, const string & attr
Value * vNew = state.allocValue();
state.autoCallFunction(autoArgs, *v, *vNew);
v = vNew;
state.forceValue(*v);
state.forceValue(*v, v->determinePos(vIn.determinePos(noPos)));
/* It should evaluate to either a set or an expression,
according to what is specified in the attrPath. */