Hello Chicken friends,

the attached patch corrects the types.db entry for the `eval' function
to allow multiple return values. I also added some tests to
library-tests.scm for a lack of more suitable better place.

Moritz
>From 3ad6146e9b9e87c43f37ae511f025be2af117f0d Mon Sep 17 00:00:00 2001
From: Moritz Heidkamp <mor...@twoticketsplease.de>
Date: Sat, 14 Apr 2012 20:37:06 +0200
Subject: [PATCH] Correct the types.db entry for `eval' to allow multiple
 return values.

---
 tests/library-tests.scm |    6 ++++++
 types.db                |    2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/library-tests.scm b/tests/library-tests.scm
index f133f3f..1268bd4 100644
--- a/tests/library-tests.scm
+++ b/tests/library-tests.scm
@@ -278,3 +278,9 @@
 
 (assert-fail (make-blob -1))
 (assert-fail (make-vector -1))
+
+;;; eval return values
+
+(assert (= 1 (eval 1)))
+(assert (eq? '() (receive (eval '(values)))))
+(assert (equal? '(1 2 3) (receive (eval '(values 1 2 3)))))
diff --git a/types.db b/types.db
index be90225..7aed56f 100644
--- a/types.db
+++ b/types.db
@@ -659,7 +659,7 @@
 			 (let ((#(tmp2) #(2)))
 			   (#(tmp2) (#(tmp1)))))))
 
-(eval (procedure eval (* #!optional (struct environment)) *))
+(eval (procedure eval (* #!optional (struct environment)) . *))
 (char-ready? (#(procedure #:enforce) char-ready? (#!optional input-port) boolean))
 
 (imag-part (#(procedure #:clean #:enforce) imag-part (number) number)
-- 
1.7.9.4

_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to