1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-21 03:00:19 +02:00

Fix no-clause case-lambda in peval

This is checked by optargs.test, which 3b47f87618
broke.

* module/language/tree-il/peval.scm (peval): Account for no clause (= no body)
  case-lambda.
This commit is contained in:
Daniel Llorens 2023-03-17 21:03:33 +01:00
parent 3b47f87618
commit f0df1ed0fd
2 changed files with 2 additions and 1 deletions

View file

@ -1671,6 +1671,7 @@ top-level bindings from ENV and return the resulting expression."
(($ <lambda> src-proc meta orig-body)
;; If there are multiple cases and one matches nargs, omit all the others.
(or (and
orig-body
(lambda-case-alternate orig-body)
(let ((nargs (length orig-args)))
(let loop ((body orig-body))