about summary refs log tree commit diff
path: root/src/libexpr/parser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/parser.cc')
-rw-r--r--src/libexpr/parser.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libexpr/parser.cc b/src/libexpr/parser.cc
index 5c2c85cd73af..7adbcb618e8c 100644
--- a/src/libexpr/parser.cc
+++ b/src/libexpr/parser.cc
@@ -118,10 +118,8 @@ static void checkAttrSets(ATerm e)
         ATermMap names(ATgetLength(formals));
         for (ATermIterator i(formals); i; ++i) {
             ATerm name;
-            Expr deflt;
-            if (!matchNoDefFormal(*i, name) &&
-                !matchDefFormal(*i, name, deflt))
-                abort();
+            ATerm d1, d2;
+            if (!matchFormal(*i, name, d1, d2)) abort();
             if (names.get(name))
                 throw EvalError(format("duplicate formal function argument `%1%' at %2%")
                     % aterm2String(name) % showPos(pos));