From cadae49fec0df40e36c0b5b3e7ce1e9b72e7bf76 Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sun, 4 Dec 2022 23:31:25 +0900 Subject: [PATCH] Fix sexp_contains_syntax_p_bound for synclos in dotted rest position. Closes #464. --- eval.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eval.c b/eval.c index a72e1ed2..d6fe231b 100644 --- a/eval.c +++ b/eval.c @@ -624,8 +624,7 @@ static int sexp_contains_syntax_p_bound(sexp x, int depth) { if (i > 0 && (ls1 == ls2 || ls1 == sexp_car(ls2))) return 0; /* cycle, no synclo found, assume none */ } - if (sexp_synclop(ls1)) - return sexp_contains_syntax_p_bound(sexp_id_name(ls1), depth-1); + return sexp_contains_syntax_p_bound(ls1, depth-1); } else if (sexp_vectorp(x)) { for (i = 0; i < sexp_vector_length(x); ++i) if (sexp_contains_syntax_p_bound(sexp_vector_ref(x, sexp_make_fixnum(i)), depth-1))