armedbear / abcl

Armed Bear Common Lisp <git+https://github.com/armedbear/abcl/> <--> <svn+https://abcl.org/svn> Bridge
https://abcl.org#rdfs:seeAlso<https://gitlab.common-lisp.net/abcl/abcl>
Other
288 stars 29 forks source link

[clos] changes to a class are only propagated to its existent direct instances but not to the existent instances of its subclasses #630

Closed alejandrozf closed 10 months ago

alejandrozf commented 10 months ago

While working for solve #80 I found this issue

CL-USER(1): (defclass a () ())
#<STANDARD-CLASS A {36AE996}>
CL-USER(2): (defclass b (a) ())
#<STANDARD-CLASS B {1794618C}>
CL-USER(3): (setf olda (make-instance 'a))
#<A {1D439996}>
CL-USER(4): (setf oldb (make-instance 'b))
#<B {83E2CDE}>
CL-USER(5): (defclass a () ((s :accessor s :initarg :s :initform 1)))
#<STANDARD-CLASS A {36AE996}>
CL-USER(6): (slot-value olda 's)
1
CL-USER(7): (slot-value oldb 's)
#<THREAD "interpreter" native {49571680}>: Debugger invoked on condition of type SIMPLE-ERROR
  The slot S is missing from the class #<STANDARD-CLASS B {1794618C}>.
Restarts:
  0: TOP-LEVEL Return to top level.
[1] CL-USER(8): 

I think I have located the issue in the code, trying to solve it now

easye commented 10 months ago

Changes merged in https://github.com/armedbear/abcl/commit/92cbc246fe67438b025254f81487cd3236febb4f.