1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

add contification test

* test-suite/tests/rtl-compilation.test ("contification"): Add
  contification test where non-recursive call is not in tail position
  relative to the letrec.
This commit is contained in:
Andy Wingo 2013-10-04 15:09:31 +02:00
parent 7ea00e230a
commit e0230913e9

View file

@ -158,7 +158,16 @@
(define (odd? x)
(if (null? x) #f (even? (cdr x))))
(even? x)))
'(1 2 3)))))
'(1 2 3))))
(pass-if-equal '(#t)
((run-rtl '(lambda (x)
(define (even? x)
(if (null? x) #t (odd? (cdr x))))
(define (odd? x)
(if (null? x) #f (even? (cdr x))))
(list (even? x))))
'(1 2 3 4))))
(with-test-prefix "case-lambda"
(pass-if-equal "simple"