mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
fix scoping in let-keywords
* module/ice-9/optargs.scm (let-keywords): I thought that I had the scoping right here, but I didn't. Make sure that the lambda formals for the initializers are new, fresh identifiers, so that let scoping works appropriately.
This commit is contained in:
parent
4b1c3f0e06
commit
e581ec7874
1 changed files with 2 additions and 1 deletions
|
@ -155,12 +155,13 @@
|
|||
(lambda (vars inits)
|
||||
(with-syntax ((n (length vars))
|
||||
(vars vars)
|
||||
(ivars (generate-temporaries vars))
|
||||
((kw ...) (map symbol->keyword
|
||||
(map syntax->datum vars)))
|
||||
((idx ...) (iota (length vars)))
|
||||
((t ...) (generate-temporaries vars))
|
||||
((i ...) inits))
|
||||
#'(let ((t (lambda vars i))
|
||||
#'(let ((t (lambda ivars i))
|
||||
...)
|
||||
(apply (lambda vars b0 b1 ...)
|
||||
(or (parse-lambda-case '(0 0 #f n aok ((kw . idx) ...))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue