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

Bug in REMOVE-NAMED-METHOD



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)))))