mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
* 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.
13 lines
341 B
Scheme
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))
|
|
|