[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in class allocated slot initialization



I am using the the pcl version 8/2/88 (beta) August 2nd, 1988 with some
patches.  I have found a bug in the initialization of class allocated slots:

It occurs only when pcl::*slotd-unsupplied* is eq to the initialized value,
   e.g. t or nil.



;;; Sun Common Lisp, Development Environment 2.1.1,  4-Mar-88
.......  blah blah blah

> pcl::*slotd-unsupplied*
(PCL::*SLOTD-UNSUPPLIED*)
> (use-package 'pcl)
T
> (defclass top () ((class-alloc-slot :allocation :class :initform "INIT AT THE
   TOP")))
NIL
> (defclass bottom (top)((class-alloc-slot :allocation :class :initform nil)))
NIL
> (setq top (make-instance 'top)
        bottom (make-instance 'bottom))
#<BOTTOM 42056353>
> (slot-value top 'class-alloc-slot)
"INIT AT THE TOP"
> (slot-value bottom 'class-alloc-slot)
NIL
> (setq pcl::*slotd-unsupplied* nil)
NIL
> (defclass middle (top)
        ((class-alloc-slot :allocation :class :initform nil)))
NIL
> (setq middle (make-instance 'middle))
#<MIDDLE 42067413>
> (slot-value middle 'class-alloc-slot)
"INIT AT THE TOP"
> ;
  ; Now the instance of class "middle" has inherited the value of "class-alloc-s
   lot"
  ; from the class "top" which is incorrect.



  Any fixes? and does this occur with the newer release?

        Eric Nielsen
        Dept of Mechanical Engineering
        University of Massachusetts at Amherst

        AIDEN@UMAECS.bitnet