mirror of
https://github.com/NixOS/nix
synced 2025-07-02 13:31:48 +02:00
* Refactoring to support domain checks.
This commit is contained in:
parent
9c3099d328
commit
57751fdb55
10 changed files with 36 additions and 29 deletions
|
@ -121,12 +121,11 @@ static void getDerivations(EvalState & state, Expr e,
|
|||
ATerm body, pos;
|
||||
if (matchFunction(e, formals, body, pos)) {
|
||||
for (ATermIterator i(formals); i; ++i) {
|
||||
Expr name, def;
|
||||
if (matchNoDefFormal(*i, name))
|
||||
Expr name, def; ATerm values, def2;
|
||||
if (!matchFormal(*i, name, values, def2)) abort();
|
||||
if (!matchDefaultValue(def2, def))
|
||||
throw TypeError(format("cannot auto-call a function that has an argument without a default value (`%1%')")
|
||||
% aterm2String(name));
|
||||
else if (!matchDefFormal(*i, name, def))
|
||||
abort(); /* can't happen */
|
||||
}
|
||||
getDerivations(state,
|
||||
makeCall(e, makeAttrs(ATermMap(0))),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue