From 57cd19ca241b3f94f92e33ab5c8c610af73293fb Mon Sep 17 00:00:00 2001 From: Jakub Jankiewicz Date: Tue, 23 Jan 2024 16:19:13 +0100 Subject: [PATCH] add failing test #288 --- tests/syntax.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/syntax.scm b/tests/syntax.scm index 739f4736b..6cd949950 100644 --- a/tests/syntax.scm +++ b/tests/syntax.scm @@ -1152,3 +1152,21 @@ (foo () "a" "b") (foo () "x") (t.is #t #t))) + +(test.failing "syntax: recursive use of free variable hygiene #288" + (lambda (t) + (define-syntax call/mv + (syntax-rules () + ((call/mv consumer producer1 ...) + (letrec-syntax + ((aux (syntax-rules ::: () + ((aux %consumer () ((%producer1 args1) :::)) + (let-values (((proc) %consumer) + (args1 %producer1) :::) + (apply proc (append args1 :::)))) + ((aux %consumer (%producer1 producer2 :::) (temp :::)) + (aux %consumer (producer2 :::) (temp ::: (%producer1 args1))))))) + (aux consumer (producer1 ...) ()))))) + + + (t.is (call/mv string (values #\a #\b) (values #\c #\d)) (#\a #\b #\c #\d))))