diff --git a/eval.c b/eval.c index b048d33b..83be070c 100644 --- a/eval.c +++ b/eval.c @@ -618,6 +618,7 @@ static int sexp_cyclic_synclop(sexp x) { #endif sexp sexp_strip_synclos_bound (sexp ctx, sexp x, int depth) { + int i; sexp_gc_var3(res, kar, kdr); if (depth <= 0) return x; sexp_gc_preserve3(ctx, res, kar, kdr); @@ -629,6 +630,9 @@ sexp sexp_strip_synclos_bound (sexp ctx, sexp x, int depth) { sexp_pair_source(res) = sexp_pair_source(x); sexp_immutablep(res) = 1; } else { + if (sexp_vectorp(x)) + for (i = 0; i < sexp_vector_length(x); ++i) + sexp_vector_set(x, sexp_make_fixnum(i), sexp_strip_synclos_bound(ctx, sexp_vector_ref(x, sexp_make_fixnum(i)), depth-1)); res = x; } sexp_gc_release3(ctx); diff --git a/tests/r7rs-tests.scm b/tests/r7rs-tests.scm index a9572244..4c39bd9d 100644 --- a/tests/r7rs-tests.scm +++ b/tests/r7rs-tests.scm @@ -534,6 +534,12 @@ (ffoo ff) (test 100 (ff 10))) +(let-syntax ((vector-lit + (syntax-rules () + ((vector-lit) + '#(b))))) + (test '#(b) (vector-lit))) + (test-end) (test-begin "5 Program structure")