Follow-up Comment #5, bug #25525 (project guile):

Ok, I did an attempt to make an acceptable fix to this.

The problem was that in <class> the name slot order of the layout
changed due to the new slot again called name. This cassed lookup code that
assumes a fixed layout to fetch the wrong values due to a shift of the layout.
The added fix will, at class creation, verify if the class is deducing
<class>. If so and there is an attempt to add a new slot named already defined
by <class>, an error will be signaled, see result below,

scheme@(guile-user)> (define-class <test-class> (<class>) name)
ERROR: In procedure %compute-slots:
ERROR: In procedure init-object: a predefined <class> inherrited field cannot
be redefined

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> 

A patch includeing some solidification of the code by making sure
a pair is used where it is assumed it does is added as well.

See goopsdiff diff below.

(file #23840)
    _______________________________________________________

Additional Item Attachment:

File name: goopsdiff.diff                 Size:4 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?25525>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


Reply via email to