mirror of
https://github.com/NixOS/nix
synced 2025-06-29 23:13:14 +02:00
* Default function arguments.
This commit is contained in:
parent
0690c1c9c0
commit
80bb477cc4
3 changed files with 17 additions and 9 deletions
|
@ -171,7 +171,10 @@ Expr substitute(const ATermMap & subs, Expr e)
|
|||
ATermMap subs2(subs);
|
||||
ATermList fs = formals;
|
||||
while (!ATisEmpty(fs)) {
|
||||
if (!ATmatch(ATgetFirst(fs), "<str>", &s)) abort();
|
||||
Expr def;
|
||||
if (!ATmatch(ATgetFirst(fs), "NoDefFormal(<str>)", &s) &&
|
||||
!ATmatch(ATgetFirst(fs), "DefFormal(<str>, <term>)", &s))
|
||||
abort();
|
||||
subs2.remove(s);
|
||||
fs = ATgetNext(fs);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue