summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-03-31 13:44:24 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-03-31 13:44:24 -0700
commita90b5a19094bd2fc0178897afa3c385227a96ad1 (patch)
treec5428613a4761b75fc463d63187c561588d9e2ba /share
parentd934a3e1fc57f3efcdd772ae2822efc845e74468 (diff)
downloadtxr-a90b5a19094bd2fc0178897afa3c385227a96ad1.tar.gz
txr-a90b5a19094bd2fc0178897afa3c385227a96ad1.tar.bz2
txr-a90b5a19094bd2fc0178897afa3c385227a96ad1.zip
compiler: bugfix: scope of init-forms in lambda.
* share/txr/stdlib/compiler.tl (comp-lambda): The init-forms for optional parameters in a lambda must be compiled in the environment in which prior arguments are visible.
Diffstat (limited to 'share')
-rw-r--r--share/txr/stdlib/compiler.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index b7b51152..c8563bea 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -677,7 +677,7 @@
(ifrags (collect-each ((op opt-pars))
(tree-bind (var-sym : init-form have-sym) op
(let ((vbind nenv.(lookup-var var-sym)))
- me.(compile vbind.loc env init-form)))))
+ me.(compile vbind.loc nenv init-form)))))
(opt-code (append-each ((op opt-pars)
(ifrg ifrags))
(tree-bind (var-sym : init-form have-sym) op