summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-01-24 01:47:59 -0800
committerKaz Kylheku <kaz@kylheku.com>2017-01-24 01:47:59 -0800
commit71bd153f6efd3cc3157bb9dbdf55c97b6e0ad2f5 (patch)
tree97b1627e0f02c9655e0c4f1477fc1367e376ba95 /txr.1
parent2f4e1ba3ba68c2b5c0f92778352866d6ed9959b0 (diff)
downloadtxr-71bd153f6efd3cc3157bb9dbdf55c97b6e0ad2f5.tar.gz
txr-71bd153f6efd3cc3157bb9dbdf55c97b6e0ad2f5.tar.bz2
txr-71bd153f6efd3cc3157bb9dbdf55c97b6e0ad2f5.zip
bugfix: wrong macro env across param expansion.
The issue is that optional argument init forms have visibility to prior arguments. However, they are being expanded in the original macro environment which doesn't take into account any preceding variable bindings. This is wrong: the preceding variables must shadow any symbol macros in the outer environment. * eval.c (expand_opt_params_rec, expand_params_rec): Create a var shadowing macro environment for every parameter name (or destructuring parameter list) that is traversed, and use that macro environment to process the remaining parameters. (make_var_shadowing_env): Allow the function to take a single symbol instead of a list of symbols.
Diffstat (limited to 'txr.1')
0 files changed, 0 insertions, 0 deletions