From 8c1615312fd547c9431a19ea9013163c52c93bef Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 25 Nov 2016 06:32:04 -0800 Subject: 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 @. --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval.c b/eval.c index 6b1f567f..566a1877 100644 --- a/eval.c +++ b/eval.c @@ -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)); } -- cgit v1.2.3