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

no-applicable-method



I encountered a strange phenomenon when I was using and :around method
for the no-applicable-method generic function.  A sample of the code used
is:

(defmethod :around ((gen-func standard-generic-function) &rest args)
  (if (next-method-p)
      (call-next-method)
      ... else report some error))

The actual method does a bit more by calling some other gen funcs but the
above code seems to be the cause of the problem.  I tested out next-method-p
and it returns true, implying that a next method exists and so it is
invoked, however, this causes an infinite loop causing a stack overflow.
A backtrace revealed that it was invoking itself and not the default
primary method.  Even if this method were to redefine the default method
(though it shouldn't), next method-p should not return true then.  I
am using Victoria Day PCL.

CW
(reply to: CHEEWEEI%itivax.bitnet)