|
[Sbcl-commits] CVS: sbcl/tests compiler.impure.lisp,1.20,1.21
From: Alexey Dejneka <adejneka@us...> - 2002-09-27 11:31
|
Update of /cvsroot/sbcl/sbcl/tests
In directory usw-pr-cvs1:/tmp/cvs-serv27039a/tests
Modified Files:
compiler.impure.lisp
Log Message:
0.7.8.2:
Added type checks for explicit THEs in arguments in full
calls. Simple type checking is not still performed.
Index: compiler.impure.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/tests/compiler.impure.lisp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- compiler.impure.lisp 16 Sep 2002 15:17:05 -0000 1.20
+++ compiler.impure.lisp 27 Sep 2002 11:30:58 -0000 1.21
@@ -359,6 +359,24 @@
(raises-error? (foo 3) type-error)
(raises-error? (foo 3f0) type-error)
+
+;;; until 0.8.2 SBCL did not check THEs in arguments
+(defun the-in-arguments-aux (x)
+ x)
+(defun the-in-arguments-1 (x)
+ (list x (the-in-arguments-aux (the (single-float 0s0) x))))
+(defun the-in-arguments-2 (x)
+ (list x (the-in-arguments-aux (the single-float x))))
+
+(multiple-value-bind (result condition)
+ (ignore-errors (the-in-arguments-1 1))
+ (assert (null result))
+ (assert (typep condition 'type-error)))
+#+nil
+(multiple-value-bind (result condition)
+ (ignore-errors (the-in-arguments-2 1))
+ (assert (null result))
+ (assert (typep condition 'type-error)))
;;;; tests not in the problem domain, but of the consistency of the
;;;; compiler machinery itself
|
| Thread | Author | Date |
|---|---|---|
| [Sbcl-commits] CVS: sbcl/tests compiler.impure.lisp,1.20,1.21 | Alexey Dejneka <adejneka@us...> |