1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Fix error message in lambda* eval closures with keywords

* module/ice-9/eval.scm (primitive-eval): For ((lambda* (#:key foo) foo) 'bar),
  give an "invalid keyword" error instead of a "wrong number of
  arguments" error.
This commit is contained in:
Andy Wingo 2013-11-08 10:37:09 +01:00
parent 0e3a59f750
commit 6a59420a9d

View file

@ -384,7 +384,7 @@
(cond
((or (< nargs nreq)
(and (not kw) (not rest?) (> nargs (+ nreq nopt)))
(and kw (not rest?) (> (npositional %args) (+ nreq nopt))))
(and alt kw (not rest?) (> (npositional %args) (+ nreq nopt))))
(if alt
(apply alt-proc %args)
((scm-error 'wrong-number-of-args