summaryrefslogtreecommitdiff
path: root/test-suite/tests/peval.test
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-05-28 11:20:29 -0400
committerAndy Wingo <wingo@pobox.com>2013-06-10 22:43:13 +0200
commit64fc50c294df9b6644fd40bec90eb8f4dfbc3907 (patch)
tree6a68d8f1d4d338f8a207accbd74db073f0f3f631 /test-suite/tests/peval.test
parent4828538940e6fcd1637f359fa5557acb4b6e9c91 (diff)
downloadguile-64fc50c294df9b6644fd40bec90eb8f4dfbc3907.tar.gz
Simplify let-values to let if consumer binds only one variable
* module/language/tree-il/peval.scm (peval): let-values with a consumer that has only one argument is the same as let. * test-suite/tests/peval.test ("partial evaluation"): Add test.
Diffstat (limited to 'test-suite/tests/peval.test')
-rw-r--r--test-suite/tests/peval.test7
1 files changed, 6 insertions, 1 deletions
diff --git a/test-suite/tests/peval.test b/test-suite/tests/peval.test
index ecc5dd187..f409e943a 100644
--- a/test-suite/tests/peval.test
+++ b/test-suite/tests/peval.test
@@ -1236,4 +1236,9 @@
(call-with-prompt t
(lambda () (abort-to-prompt t 1 2 3))
(lambda (k x y z) (list x y z))))
- (primcall list (const 1) (const 2) (const 3))))
+ (primcall list (const 1) (const 2) (const 3)))
+
+ (pass-if-peval
+ (call-with-values foo (lambda (x) (bar x)))
+ (let (x) (_) ((call (toplevel foo)))
+ (call (toplevel bar) (lexical x _)))))