diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-11-25 06:32:04 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-11-25 06:32:04 -0800 |
commit | a5706bba994d356fb4b0a3a01a789d8b06e76713 (patch) | |
tree | 80076eee101f0f328637363268d85e97459098e3 /eval.c | |
parent | 6fc30f12133f6144a7c57df0bc0c397d64387bb9 (diff) | |
download | txr-a5706bba994d356fb4b0a3a01a789d8b06e76713.tar.gz txr-a5706bba994d356fb4b0a3a01a789d8b06e76713.tar.bz2 txr-a5706bba994d356fb4b0a3a01a789d8b06e76713.zip |
bugfix: op handles @rest in dot position.
The test case is (op list . @rest) and similar, which were
expanding to a syntax containing an incorrect form like
[sys:apply list sys:var rest #:rest-0123] where the
sys:var rest are superfluous.
* eval.c (transform_op): Missing case: the code which handles
metas in the dot position must handle @rest not only @<number>.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3048,7 +3048,7 @@ static val transform_op(val forms, val syms, val rg) /* This handles improper list forms like (a b c . @42) when the recursion hits the @42 part. */ - if (fi == var_s && integerp(car(re))) { + if (fi == var_s && (integerp(car(re)) || car(re) == rest_s)) { cons_bind (outsyms, outforms, transform_op(cons(forms, nil), syms, rg)); return cons(outsyms, rlcp(car(outforms), outforms)); } |