Skip to content

Commit

Permalink
add failing test #288
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Jan 23, 2024
1 parent 3623a15 commit 57cd19c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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))))

0 comments on commit 57cd19c

Please sign in to comment.