为什么我不能在 sbcl 中获得一个简单的类优先级列表?
* (sb-mop::class-precedence-list (find-class 'cons));;works
(#<BUILT-IN-CLASS CONS> #<BUILT-IN-CLASS LIST> #<SB-PCL:SYSTEM-CLASS SEQUENCE>
#<SB-PCL:SYSTEM-CLASS T>)
* (defclass my-class () nil)
* (sb-mop::class-precedence-list (find-class 'my-class))
debugger invoked on a UNBOUND-SLOT in thread
#<THREAD "main thread" RUNNING {10039CE8D3}>:
The slot SB-PCL::%CLASS-PRECEDENCE-LIST is unbound in the object
#<STANDARD-CLASS MY-CLASS>.
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [USE-VALUE ] Return a value as the slot-value.
1: [STORE-VALUE] Store and return a value as the slot-value.
2: [ABORT ] Exit debugger, returning to top level.
((:METHOD SLOT-UNBOUND (T T T)) #<unavailable argument> #<STANDARD-CLASS MY-CLASS> SB-PCL::%CLASS-PRECEDENCE-LIST) [fast-method]
0] 2