1
Fork 0
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:
Andy Wingo 2009-11-14 13:26:46 +01:00
parent 4b1c3f0e06
commit e581ec7874

View file

@ -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) ...))