Fixed merging of slot accessors from child and parent classes.

This commit is contained in:
jgarcia 2006-04-24 08:44:39 +00:00
parent 330c3e6e09
commit 09cb7b7224
2 changed files with 13 additions and 2 deletions

View file

@ -114,6 +114,11 @@ ECL 0.9i
of which methods were in a defgeneric function is done using the property
list of the methods.
- When a class inherits from two or more classes, slot definitions with the
same name must be merged. In particular, when a slot has the same name in
two parents, all accessors from all classes should be available for the
child.
* Errors fixed:
- The intermediate output of the compiler is written in the directory in which

View file

@ -286,10 +286,16 @@ because it contains a reference to the undefined class~% ~A"
(old-type (slot-definition-type old-slotd)))
(setf (slot-definition-initargs new-slotd)
(union (slot-definition-initargs new-slotd)
(slot-definition-initargs old-slotd)))
(slot-definition-initargs old-slotd)))
(when (eq (slot-definition-initform new-slotd) '+INITFORM-UNSUPPLIED+)
(setf (slot-definition-initform new-slotd) (slot-definition-initform old-slotd)))
(setf (slot-definition-type new-slotd)
(setf (slot-definition-readers new-slotd)
(union (slot-definition-readers new-slotd)
(slot-definition-readers old-slotd))
(slot-definition-writers new-slotd)
(union (slot-definition-writers new-slotd)
(slot-definition-writers old-slotd))
(slot-definition-type new-slotd)
;; FIXME! we should be more smart then this:
(cond ((subtypep new-type old-type) new-type)
((subtypep old-type new-type) old-type)