From: Christophe Rhodes Date: Fri, 15 Sep 2006 08:23:31 +0000 (+0000) Subject: 0.9.16.31: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=93db5c1b87b1cf58533c503c78401b817d7208d8;p=sbcl.git 0.9.16.31: Belatedly add a test for the primitive-type / intersection-type confusion. --- diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index cfc11c1..7e53ee2 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -411,11 +411,12 @@ ;;; 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)))) @@ -2126,3 +2127,18 @@ (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))) diff --git a/version.lisp-expr b/version.lisp-expr index db872f1..e359d92 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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"