(reported by Jan Moringen; lp#815155)
* bug fix: a compiler error during typecheck generation, reported by Eric
Marsden.
+ * bug fix: obsolete instance protocol fires when shared slots are added
+ or removed.
changes in sbcl-1.0.50 relative to sbcl-1.0.49:
* enhancement: errors from FD handlers now provide a restart to remove
(cond ((null owrapper)
(make-wrapper nslots class))
((and (equal nlayout olayout)
- (loop for o in owrapper-class-slots
- for n in nwrapper-class-slots
- always (eq (car o) (car n)))
+ (equal (mapcar #'car owrapper-class-slots)
+ (mapcar #'car nwrapper-class-slots))
(slotd-classes-eq (slot-value class 'slots) eslotds))
owrapper)
(t
((foo :initarg :foo :reader foofoo :function car))
(:metaclass func-slot-class)))
(assert (eq x (foofoo o)))))
+
+(defclass class-slot-removal-test ()
+ ((instance :initform 1)
+ (class :allocation :class :initform :ok)))
+
+(defmethod update-instance-for-redefined-class ((x class-slot-removal-test) added removed plist &rest inits)
+ (throw 'update-instance
+ (list added removed plist inits)))
+
+(with-test (:name :class-redefinition-removes-class-slot)
+ (let ((o (make-instance 'class-slot-removal-test)))
+ (assert (equal '(nil nil nil nil)
+ (catch 'update-instance
+ (eval `(defclass class-slot-removal-test ()
+ ((instance :initform 2))))
+ (slot-value o 'instance))))))
+
+(defclass class-slot-add-test ()
+ ((instance :initform 1)))
+
+(defmethod update-instance-for-redefined-class ((x class-slot-add-test) added removed plist &rest inits)
+ (throw 'update-instance
+ (list added removed plist inits)))
+
+(with-test (:name :class-redefinition-adds-class-slot)
+ (let ((o (make-instance 'class-slot-add-test)))
+ (assert (equal '(nil nil nil nil)
+ (catch 'update-instance
+ (eval `(defclass class-slot-add-test ()
+ ((instance :initform 2)
+ (class :allocation :class :initform :ok))))
+ (slot-value o 'instance))))))
\f
;;;; success