From 9976492deac95a541b9f737e92d53c1770e942d1 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Mon, 23 May 2005 16:10:24 +0000
Subject: [PATCH] Patch from Gerd Moellmann, cmucl-imp, 2005-05-21:

    ;; Shared slot becomes local.
    ;; 4.3.6.1.: "The value of a slot that is specified as shared in the old class
    ;;            and as local in the new class is retained."
    (multiple-value-bind (value condition)
	(ignore-errors
	  (defclass foo85a () ((size :initarg :size :initform 1 :allocation :class)))
	  (defclass foo85b (foo85a) ())
	  (setq i (make-instance 'foo85b))
	  (defclass foo85a () ((size :initarg :size :initform 2) (other)))
	  (slot-value i 'size))
      (list value (type-of condition)))
    Expected: (1 NULL)
---
 pcl/std-class.lisp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/pcl/std-class.lisp b/pcl/std-class.lisp
index e2358f555..1b6b75ca9 100644
--- a/pcl/std-class.lisp
+++ b/pcl/std-class.lisp
@@ -26,7 +26,7 @@
 ;;;
 
 (file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/std-class.lisp,v 1.76 2005/05/23 15:38:20 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/std-class.lisp,v 1.77 2005/05/23 16:10:24 rtoy Exp $")
 
 (in-package :pcl)
 
@@ -1413,6 +1413,14 @@
 	     (added ())
 	     (discarded ())
 	     (plist ()))
+        ;;
+        ;; Collect inherited class slots.  Note that LAYOUT-INHERITS is
+        ;; ordered from most general to most specific.
+        (loop for layout across (reverse (kernel:layout-inherits owrapper))
+              when (typep layout 'wrapper) do
+                (loop for slot in (wrapper-class-slots layout) do
+                        (pushnew slot oclass-slots :key #'car)))
+        ;;
 	;; local  --> local        transfer 
 	;; local  --> shared       discard
 	;; local  -->  --          discard
-- 
GitLab