diff --git a/src/CHANGELOG b/src/CHANGELOG index adc8cff00..ba5a4a95a 100644 --- a/src/CHANGELOG +++ b/src/CHANGELOG @@ -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 diff --git a/src/clos/standard.lsp b/src/clos/standard.lsp index 56b055667..3f3392c38 100644 --- a/src/clos/standard.lsp +++ b/src/clos/standard.lsp @@ -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)