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


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

(defmethod :around ((gen-func standard-generic-function) &rest args)
  (if (next-method-p)
      ... 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.

(reply to: CHEEWEEI%itivax.bitnet)