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

defclass/accessor problem



I do something like

(defclass foo (parenta parentb parentc)
  ((slot-a :accessor foo-slot-a)
   (slot-b :accessor foo-slot-b)))

When I call FOO-SLOT-A I get the error 
>> There are no methods on the generic-function #<Compiled-Function FOO-SLOT-A 1453F17>,
   so it is an error to call it.

And sure enough, (pcl::generic-function-methods #'foo-slot-a) returns NIL.
But FOO-SLOT-B is perfectly cool.
I do not in any way specialize FOO-SLOT-A or FOO-SLOT-B.
Re-evaluating the defclass does not make the problem go away, but doing
(defclass foo () ()) and THEN re-evaluating the original makes the
correct definition of FOO-SLOT-A exist.  Evaluating the defclass again
after that makes it go away again.

This is not an especially reproducible problem.  The actual class that
I am having this problem with has about twenty slots, and inherits
about thirty more.  The slots that have this problem are the last
three.  The problem exhibits itself after instances have been made.
I'm using Lucid Lisp 3.0 on a Sun 3.

Any ideas?

Jamie