[bknr-devel] bknr.indices, the slot NIL is missing from the object
    Klaus Unger 
    UngerKlaus at gmx.de
       
    Thu Feb 21 02:15:56 UTC 2008
    
    
  
Hi,
when using class indices they do not have a slot name. On 
destruction/index-remove this throws a condition on checking slot-boundp.
I am using SBCL 1.0.14.23 and the latest bknr indices code, only indices, 
nothing else.
Best regards
 Klaus
;Package changed to BKNR.INDICES
#<PACKAGE "BKNR.INDICES">
BKNR.INDICES>
(defvar *class-index* (index-create 'class-index :index-subclasses t))
*CLASS-INDEX*
BKNR.INDICES>
(defclass base-object ()
  ()
  (:metaclass indexed-class)
  (:class-indices (class :index *class-index*
    :slots nil
    :index-reader objects-of-class
    :index-values all-objects
    :index-subclasses t
    :index-keys all-class-names)
  (classes :index-type class-index
    :index-initargs (:index-superclasses t)
    :slots nil
    :index-subclasses t
    :index-reader objects-with-class)))
#<INDEXED-CLASS BASE-OBJECT>
; in: LAMBDA NIL
;     (SB-KERNEL:FLOAT-WAIT)
; 
; note: deleting unreachable code
; 
; compilation unit finished
;   printed 1 note
BKNR.INDICES>
(defclass child1 (base-object)
  ()
  (:metaclass indexed-class))
#<INDEXED-CLASS CHILD1>
BKNR.INDICES>
(defclass child2 (base-object)
  ((a :initarg :a))
  (:metaclass indexed-class))
#<INDEXED-CLASS CHILD2>
BKNR.INDICES>
(make-instance 'child1)
#<CHILD1 {AC66381}>
BKNR.INDICES>
(all-objects)
(#<CHILD1 {AC66381}>)
BKNR.INDICES>
(destroy-object (first (all-objects)))
When attempting to test to see whether slot is bound (SLOT-BOUNDP),
the slot NIL is missing from the object #<CHILD1 {A7422D9}>.
   [Condition of type SIMPLE-ERROR]
	0: [ABORT] Return to SLIME's top level.
	1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" 
{B54A251}>)
]> Quit debug
    
    
More information about the Bknr-devel
mailing list