diff options
author | Daniel Llorens <lloda@sarc.name> | 2023-03-17 21:03:33 +0100 |
---|---|---|
committer | Daniel Llorens <lloda@sarc.name> | 2023-03-17 21:17:10 +0100 |
commit | f0df1ed0fdca7a63cffda5e53c968e814b7b06ec (patch) | |
tree | 086985028f5b194c102b0f46fccdcbf536b62075 | |
parent | 3b47f87618047ebb8812788c64a44877a4f2e0dd (diff) | |
download | guile-f0df1ed0fdca7a63cffda5e53c968e814b7b06ec.tar.gz |
Fix no-clause case-lambda in peval
This is checked by optargs.test, which 3b47f87618047ebb8812788c64a44877a4f2e0dd
broke.
* module/language/tree-il/peval.scm (peval): Account for no clause (= no body)
case-lambda.
-rw-r--r-- | doc/ref/api-control.texi | 2 | ||||
-rw-r--r-- | module/language/tree-il/peval.scm | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi index 158ed8ad8..d024e14a5 100644 --- a/doc/ref/api-control.texi +++ b/doc/ref/api-control.texi @@ -1323,7 +1323,7 @@ exception handlers are invoked within the continuation of the error, without unwinding the stack. The dynamic environment of the handler call will be that of the @code{raise-exception} call, with the difference that the current exception handler will be ``unwound'' to the -\"outer\" handler (the one that was in place when the corresponding +``outer'' handler (the one that was in place when the corresponding @code{with-exception-handler} was called). However, it's often the case that one would like to handle an exception diff --git a/module/language/tree-il/peval.scm b/module/language/tree-il/peval.scm index 7c05e9a2e..36a3033b0 100644 --- a/module/language/tree-il/peval.scm +++ b/module/language/tree-il/peval.scm @@ -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)) |