[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in REMOVE-NAMED-METHOD
- To: commonloops.pa@Xerox.COM
- Subject: Bug in REMOVE-NAMED-METHOD
- From: Jim Kempf <kempf%hplabsc@hplabs.HP.COM>
- Date: Sun, 17 May 87 15:59:20 pdt
The 4/29 prime version of PCL had a bug in REMOVE-NAMED-METHOD.
The attempt to get the function from GENERIC-FUNCTION rather
than GENERIC-FUNCTION-NAME would fail, since GENERIC-FUNCTION
is bound to NIL. Here is a corrected version (from methods.l):
(defmethod remove-named-method (generic-function-name argument-specifiers
&optional extra)
(let ((generic-function ())
(method ()))
(cond ((or (null (fboundp generic-function-name))
(not (generic-function-p
(setq generic-function
(symbol-function generic-function-name)))))
(error "~S does not name a generic-function."
generic-function-name))
((null (setq method (find-method generic-function
argument-specifiers
extra
t)))
(error "There is no method for the generic-function ~S~%~
which matches the argument-specifiers ~S."
generic-function
argument-specifiers))
(t
(remove-method generic-function method)))))