Stas Boukarev <stassats@...> writes:
> Daniel Brooks <db48x@...> writes:
>
>> I think I might be doing something horribly wrong (I'm a bit new at
>> this), but for some reason I can't look up the reader functions for a
>> class using slot-definition-readers. I've narrowed the code down to a
>> very simple testcase, eliminating all the libraries and such that I'm
>> using. I've tried it in SBCL 1.0.30 packaged by my distribution and
>> 1.0.31.2 that I compiled myself. Here's the code:
>>
>> (defclass foo ()
>> ((num :reader num :initarg :num :initform 42)))
>>
>> (sb-mop:slot-definition-readers
>> (first (sb-mop:class-slots (find-class 'foo))))
>>
>
> (sb-mop:slot-definition-readers
> (first (sb-mop:class-direct-slots (find-class 'foo))))
> => (NUM)
Yes, that's what I expect, but for some reason I'm only getting NIL. How
can I figure out why it's doing this?
db48x
|