1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00
guile/testsuite/t-values.scm
Andy Wingo 9b10d0bcfd fix for (apply values '(1))
* libguile/vm-i-system.c (return/values): In the
  multiple-values-to-a-single-value-continuation (or MV but where N=1),
  null out the correct number of values from the stack. Fixes aborts on
  (apply values '(1)).

* testsuite/t-values.scm (call-with-values): Add a test.
2008-11-01 18:37:48 +01:00

13 lines
341 B
Scheme

(list (call-with-values
(lambda () (values 1 2))
(lambda (x y) (cons x y)))
;; the start-stack forces a bounce through the interpreter
(call-with-values
(lambda () (start-stack 'foo (values 1 2)))
list)
(call-with-values
(lambda () (apply values '(1)))
list))