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

CLOS bug?



    Date: Thu, 14 Jun 90 15:10 EDT
    From: barmar@Think.COM (Barry Margolin)

	Date: Thu, 14 Jun 90 10:38:12 -0400
	From: fwhite@BBN.COM (Fredric M White)

	  This bug is biting me bad. Maybe someone already has a workaround?
	Or maybe I'm losing my mind?

    I don't have any brilliant answers, but I can confirm the behavior.  I
    described the various generic function and method objects before and
    after redefining the method and don't see any difference, and
    CLOS:COMPUTE-APPLICABLE-METHODS returns the correct value even when
    ZOOT-NAME works wrong, so I suspect there is a cache somewhere that is
    not being updated when the defclass is implementing the :READER option;
    the second DEFMETHOD forces the cache to be flushed or reset from the
    generic function information.

    The only workaround I can think of is to not use :READER similar
    options, but instead to define the reader and writer methods using
    CLOS:DEFMETHOD, e.g.

    (clos:defmethod zoot-name ((object zoot))
      (clos:slot-value object 'name))

    It might be a little slower, but it should be correct.

						    barmar

I have a fix for this, I will see if it can be sent out to SLUG.  The
problem only happens if only an unspecialized method for a generic
function appears before an accessor method.