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 | 8c1615312fd547c9431a19ea9013163c52c93bef (patch) | |
tree | 80076eee101f0f328637363268d85e97459098e3 | |
parent | 73ea0f18ac4fe02c6521ffe760dd6b67101d64bb (diff) | |
download | txr-8c1615312fd547c9431a19ea9013163c52c93bef.tar.gz txr-8c1615312fd547c9431a19ea9013163c52c93bef.tar.bz2 txr-8c1615312fd547c9431a19ea9013163c52c93bef.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>.
-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)); } |