1.0.34.5: remove dead DATA-VECTOR-{REF,SET} transforms
[sbcl.git] / tests / clos.impure.lisp
index 2c1f50e..46a36a8 100644 (file)
                                 (sb-int:reference-condition-references c)
                                 :test #'equal)
                     :ok))))))
+
+(defclass remove-default-initargs-test ()
+  ((x :initarg :x :initform 42)))
+(defclass remove-default-initatgs-test ()
+  ((x :initarg :x :initform 42))
+  (:default-initargs :x 0))
+(defclass remove-default-initargs-test ()
+  ((x :initarg :x :initform 42)))
+(with-test (:name :remove-default-initargs)
+  (assert (= 42 (slot-value (make-instance 'remove-default-initargs-test)
+                            'x))))
 \f
+(with-test (:name :bug-485019)
+  ;; there was a bug in WALK-SETQ, used in method body walking, in the
+  ;; presence of declarations on symbol macros.
+  (defclass bug-485019 ()
+    ((array :initarg :array)))
+  (defmethod bug-485019 ((bug-485019 bug-485019))
+    (with-slots (array) bug-485019
+      (declare (type (or null simple-array) array))
+      (setf array (make-array 4)))
+    bug-485019)
+  (bug-485019 (make-instance 'bug-485019)))
+
 ;;;; success