aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/get-drvs.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-07-24 15:16:03 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-07-24 15:16:03 +0000
commit57751fdb55ad04d82542165417511d26304cadc2 (patch)
tree4e31f364095847bfc80b927f23e2a0d23f46e2aa /src/libexpr/get-drvs.cc
parent9c3099d3286b7bc8582b1685ba1917db409cac0c (diff)
* Refactoring to support domain checks.
Diffstat (limited to 'src/libexpr/get-drvs.cc')
-rw-r--r--src/libexpr/get-drvs.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libexpr/get-drvs.cc b/src/libexpr/get-drvs.cc
index 82e34f776..05b4897cf 100644
--- a/src/libexpr/get-drvs.cc
+++ b/src/libexpr/get-drvs.cc
@@ -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))),