Insert typechecks before RAW-INSTANCE-INIT in structure constructors
[sbcl.git] / tests / array.pure.lisp
index 4c605ed..ba823a0 100644 (file)
                              (eql 6 (type-error-datum e)))
                     :good))))))
 
+(with-test (:name :odd-keys-for-make-array)
+  (assert (eq :good
+              (handler-case
+                  (compile nil '(lambda (m) (make-array m 1)))
+                (simple-warning () :good)))))
+
+
+(with-test (:name :bug-1096359)
+  (let ((a (make-array 1 :initial-element 5)))
+    (assert (equalp (adjust-array a 2 :initial-element 10)
+                    #(5 10)))))
+
+(with-test (:name (make-array-transform-unknown-type :bug-1156095))
+  (assert
+   (handler-case
+       (compile nil `(lambda () (make-array '(1 2)
+                                            :element-type ',(gensym))))
+     (style-warning ()
+       t)
+     (:no-error (&rest args)
+       nil))))