types.
* fixed bug #308: non-graphic characters now all have names, as
required. (reported by Bruno Haible)
+ * bug fix: redefining a class with different superclasses now correctly
+ removes it from the direct-subclasses of its previous superclasses.
+ (reported by David Morse)
* bug fix: (SETF FIND-CLASS) using a FORWARD-REFERENCED-CLASS as the
new value now works. (reported by Bruno Haible)
* bug fix: correct canonicalization of multiple non-standard slot
(setf (slot-value class 'class-eq-specializer)
(make-instance 'class-eq-specializer :class class)))
-(defmethod reinitialize-instance :before ((class slot-class) &key)
- (remove-direct-subclasses class (class-direct-superclasses class))
+(defmethod reinitialize-instance :before ((class slot-class) &key direct-superclasses)
+ (dolist (old-super (set-difference (class-direct-superclasses class) direct-superclasses))
+ (remove-direct-subclass old-super class))
(remove-slot-accessors class (class-direct-slots class)))
(defmethod reinitialize-instance :after ((class slot-class)
(unless (memq class (class-direct-subclasses class))
(add-direct-subclass super class))))
-(defun remove-direct-subclasses (class supers)
- (let ((old (class-direct-superclasses class)))
- (dolist (o (set-difference old supers))
- (remove-direct-subclass o class))))
-\f
(defmethod finalize-inheritance ((class std-class))
(update-class class t))
(find-class 'standard-direct-slot-definition))
(defun make-direct-slotd (class initargs)
- (let ((initargs (list* :class class initargs)))
- (apply #'make-instance
- (apply #'direct-slot-definition-class class initargs)
- initargs)))
+ (apply #'make-instance
+ (apply #'direct-slot-definition-class class initargs)
+ :class class
+ initargs))
(defmethod compute-slots ((class std-class))
;; As specified, we must call COMPUTE-EFFECTIVE-SLOT-DEFINITION once
(assert (null value))
(assert (typep error 'error)))))
+;;; bug reported by David Morse: direct-subclass update protocol was broken
+(defclass vegetable () ())
+(defclass tomato (vegetable) ())
+(assert (equal (list (find-class 'tomato)) (sb-mop:class-direct-subclasses (find-class 'vegetable))))
+(defclass tomato () ())
+(assert (null (sb-mop:class-direct-subclasses (find-class 'vegetable))))
+
\f
;;;; success
(sb-ext:quit :unix-status 104)
;;; 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".)
-"0.8.16.43"
+"0.8.16.44"