[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in NO-APPLICABLE-METHOD ?
- To: CommonLoops.pa@Xerox.COM
- Subject: Bug in NO-APPLICABLE-METHOD ?
- From: dvs2414@ztivax.siemens.com (Christian Ammon)
- Date: Wed, 27 Sep 89 11:49:00 -0100
- Cc: dvs2414@ztivax.siemens.com
- Redistributed: CommonLoops.pa
I wanted to test the method NO-APPLICABLE-METHOD.
In "2. Functions in the Programmer Interface" stands:
"The generic function NO-APPLICABLE-METHOD is not intended to be called by
programmers. Programmer may write methods for it."
This is what I wanted but I can't build a specialized method for it.
Is it a bug in PCL or did I do something wrong?
-----------------------------------------------------------
(defmethod no-applicable-method :before (i &rest args)
(print "before"))
(setq s-f (symbol-function 'no-aplicable-method))
(desribe s-f)
--->> ...
(format t "~%Primary: ~a"
(get-method s-f nil (list (find-class 't))))
--->> Primary: #<Standard-Method NO-APPLICABLE-METHOD (T) 15045360>
(format t "~%Before : ~a"
(get-method s-f '(:before) (list (find-class 't))))
--->> Before : #<Standard-Method NO-APPLICABLE-METHOD
:BEFORE (T) 15045360>
(defclass a () ())
(defclass b () ())
(defmethod m ((i a)) (print "method M"))
(setq x (make-instance 'a))
(setq y (make-instance 'b))
(m x)
--->> "method M"
(m y)
--->> Error: No matching method for the generic-function
#<compiled-closure PCL::METHOD-FUNCTION>,
when called with arguments (NIL).
Holger Gottwald
dvs2414@ztivax.uucp