(describe (allocate-instance (find-class 'standard-class))) signals an error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
New
|
Undecided
|
Unassigned |
Bug Description
CL-USER> (describe (allocate-instance (find-class 'standard-class)))
#<STANDARD-CLASS {10133FA453}> ;; this is printed
[standard-object] ;; this is printed
And then an error is signaled:
The slot SB-PCL::NAME is unbound in the object
#<STANDARD-CLASS {10133FA453}>.
[Condition of type UNBOUND-SLOT]
Restarts:
0: [USE-VALUE] Return a value as the slot-value.
1: [STORE-VALUE] Store and return a value as the slot-value.
2: [RETRY] Retry SLIME REPL evaluation request.
3: [*ABORT] Return to SLIME's top level.
4: [ABORT] abort thread (#<THREAD "new-repl-thread" RUNNING {100DA75C93}>)
Backtrace:
0: ((:METHOD SLOT-UNBOUND (T T T)) #<unused argument> #<STANDARD-CLASS {10133FA453}> SB-PCL::NAME) [fast-method]
Locals:
1: (SLOT-VALUE #<STANDARD-CLASS {10133FA453}> SB-PCL::NAME)
Locals:
2: (SB-IMPL:
Locals:
CLASS = #<STANDARD-CLASS {10133FA453}>
NAME = NIL
STREAM = #<SWANK/
3: ((:METHOD DESCRIBE-OBJECT (CLASS T)) #<STANDARD-CLASS {10133FA453}> #<SWANK/
Locals:
STREAM = #<SWANK/
4: (DESCRIBE #<STANDARD-CLASS {10133FA453}> #<SWANK/
Locals:
5: (SB-INT:
Locals:
6: (EVAL (DESCRIBE (ALLOCATE-INSTANCE (FIND-CLASS #))))
Locals:
Are you suggesting that NAME should not be initially unbound, or that describe should print 'unbound'? As is, this seems at worst a minor inconvenience, not an actual bug. There a zillion ways to create objects whose state is incomplete for some other operation.