0.9.16.31:
authorChristophe Rhodes <csr21@cam.ac.uk>
Fri, 15 Sep 2006 08:23:31 +0000 (08:23 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Fri, 15 Sep 2006 08:23:31 +0000 (08:23 +0000)
Belatedly add a test for the primitive-type / intersection-type
confusion.

tests/compiler.pure.lisp
version.lisp-expr

index cfc11c1..7e53ee2 100644 (file)
 ;;; Moellmann: CONVERT-MORE-CALL failed on the following call
 (assert (eq (eval '((lambda (&key) 'u) :allow-other-keys nil)) 'u))
 
-(raises-error? (multiple-value-bind (a b c)
-                   (eval '(truncate 3 4))
-                 (declare (integer c))
-                 (list a b c))
-               type-error)
+(assert
+ (raises-error? (multiple-value-bind (a b c)
+                    (eval '(truncate 3 4))
+                  (declare (integer c))
+                  (list a b c))
+                type-error))
 
 (assert (equal (multiple-value-list (the (values &rest integer)
                                       (eval '(values 3))))
                    (map-into (make-array (list (length val))
                                          :element-type '(unsigned-byte 8))
                              #'char-code val)))))
+
+;;; overconfident primitive type computation leading to bogus type
+;;; checking.
+(let* ((form1 '(lambda (x) 
+                (declare (type (and condition function) x)) 
+                x))
+       (fun1 (compile nil form1))
+       (form2 '(lambda (x) 
+                (declare (type (and standard-object function) x)) 
+                x))
+       (fun2 (compile nil form2)))
+  (assert (raises-error? (funcall fun1 (make-condition 'error))))
+  (assert (raises-error? (funcall fun1 fun1)))
+  (assert (raises-error? (funcall fun2 fun2)))
+  (assert (eq (funcall fun2 #'print-object) #'print-object)))
index db872f1..e359d92 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.16.30"
+"0.9.16.31"