;;; specified by TYPE, where STYPE is the type we have checked against
;;; (which is the same but for dimensions and element type).
;;;
-;;; Secondary return value is true if generated tests passing imply
-;;; that the array has a header.
+;;; Secondary return value is true if passing the generated tests implies that
+;;; the array has a header.
(defun test-array-dimensions (obj type stype)
(declare (type array-type type stype))
(let ((obj `(truly-the ,(type-specifier stype) ,obj))
(= (%array-rank ,obj) 0))
t))
((not (array-type-complexp type))
- (values (unless (eq '* (car dims))
- `((= (vector-length ,obj) ,@dims)))
- nil))
+ (if (csubtypep stype (specifier-type 'vector))
+ (values (unless (eq '* (car dims))
+ `((= (vector-length ,obj) ,@dims)))
+ nil)
+ (values (if (eq '* (car dims))
+ `((not (array-header-p ,obj)))
+ `((not (array-header-p ,obj))
+ (= (vector-length ,obj) ,@dims)))
+ nil)))
(t
(values (unless (eq '* (car dims))
`((if (array-header-p ,obj)
:initial-element x)))
10
#c(1.0 2.0)))))
+
+(with-test (:name :regression-1.0.28.21)
+ (let ((fun (compile nil `(lambda (x) (typep x '(simple-array * 1))))))
+ (assert (funcall fun (vector 1 2 3)))
+ (assert (funcall fun "abc"))
+ (assert (not (funcall fun (make-array '(2 2)))))))
;;; 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".)
-"1.0.28.72"
+"1.0.28.73"