0.9.15.48: more precice unions of array types
[sbcl.git] / tests / type.impure.lisp
index f8ab6d2..e9891c9 100644 (file)
                      (sb-kernel:specifier-type '(cons goldbach2 single-float)))
   (assert (not ok))
   (assert (not win)))
+
+;;; precice unions of array types (was bug 306a)
+(defun bug-306-a (x)
+  (declare (optimize speed)
+           (type (or (array cons) (array vector)) x))
+  (elt (aref x 0) 0))
+(assert (= 0 (bug-306-a #((0)))))
+
 ;;; success