(defmethod baz ((x specializer1)) x)
(assert (typep (baz (make-instance 'specializer1)) 'specializer1))
+;;; ... and from McCLIM, another test case:
+(defclass specializer1a (specializer2a specializer2b) ())
+(defclass specializer2a () ())
+(defmethod initialize-instance :after
+ ((obj specializer2a) &key &allow-other-keys)
+ (print obj))
+
;;; in a similar vein, we should be able to define methods on classes
;;; that are effectively unknown to the type system:
(sb-mop:ensure-class 'unknown-type)
(assert (= (slot-value (make-instance 'definitargs-class) 'a) 1))
(assert (= (slot-value (make-instance 'definitargs-class :a 0) 'a) 0))
(assert (= *definitargs-counter* 2))
+
+;;; inherited local -> shared slot initforms
+;; (adapted from Paul F. Dietz's test suite DEFCLASS-0211.1)
+(defclass shared-to-local-initform-super ()
+ ((redefined :allocation :instance :initform 'orig-initform)))
+(defclass shared-to-local-initform-sub (shared-to-local-initform-super)
+ ((redefined :allocation :class)))
+(assert (slot-boundp (make-instance 'shared-to-local-initform-sub) 'redefined))
+(assert (eq 'orig-initform
+ (slot-value (make-instance 'shared-to-local-initform-sub) 'redefined)))
\f
;;; success
(sb-ext:quit :unix-status 104)
\ No newline at end of file