1.0.43.55: move FILE-COMPILE to compiler-test-utils.lisp
[sbcl.git] / tests / defstruct.impure.lisp
index e0ab36e..e84e4f3 100644 (file)
@@ -1061,3 +1061,13 @@ redefinition."
     (type-error (e)
       (assert (eq 'string (type-error-expected-type e)))
       (assert (zerop (type-error-datum e))))))
+
+(with-test (:name defstruct-copier-typechecks-argument)
+  (assert (not (raises-error? (copy-person (make-astronaut :name "Neil")))))
+  (assert (raises-error? (copy-astronaut (make-person :name "Fred")))))
+
+(with-test (:name :bug-528807)
+  (let ((*evaluator-mode* :compile))
+    (handler-bind ((style-warning #'error))
+      (eval `(defstruct (bug-528807 (:constructor make-528807 (&aux x)))
+               (x nil :type fixnum))))))