![](https://secure.gravatar.com/avatar/289e436f110b77324b81e000ca9b1fea.jpg?s=120&d=mm&r=g)
On Aug 26, 2012, at 19:17, Pascal Costanza <pc@p-cos.net> wrote:
OK, class redefinition doesn't trigger the obsolete instance structure protocol correctly, it seems. Here is a transcript:
CL-USER(1): (defclass person () (name)) #<STANDARD-CLASS PERSON {1E631646}> CL-USER(2): (defparameter *p* (make-instance 'person)) *P* CL-USER(3): (setf (slot-value *p* 'name) "name") "name" CL-USER(4): (defclass person () (name address)) #<STANDARD-CLASS PERSON {1E631646}> CL-USER(5): (use-package :mop) T CL-USER(6): (class-slots (find-class 'person)) (#<SYSTEM:SLOT-DEFINITION NAME {1A60232C}> #<SYSTEM:SLOT-DEFINITION ADDRESS {37A0B39B}>) CL-USER(7): (setf (slot-value-using-class (find-class 'person) *p* (second *)) "address") #<THREAD "interpreter" {43F31EDC}>: Debugger invoked on condition of type TYPE-ERROR The value 1 is not of type (INTEGER 0 1). Restarts: 0: TOP-LEVEL Return to top level.
The problematic part seems to be the use of slot-value-using-class here. With just slot-value, this works fine...
(set-)standard-instance-access didn't check for invalid object layout, fixed in r14137. Pure slot-value goes through a different code path for classes with metaclass standard-class, which did the check and update already. Thanks for reporting! Rudi