diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-03-31 13:44:24 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-03-31 13:44:24 -0700 |
commit | a90b5a19094bd2fc0178897afa3c385227a96ad1 (patch) | |
tree | c5428613a4761b75fc463d63187c561588d9e2ba /share | |
parent | d934a3e1fc57f3efcdd772ae2822efc845e74468 (diff) | |
download | txr-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.tl | 2 |
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 |