From: Christophe Rhodes Date: Mon, 27 Mar 2006 08:13:03 +0000 (+0000) Subject: 0.9.11.1: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=2b0710d31c3fa1e5448ec842504d5276842e394f;p=sbcl.git 0.9.11.1: REMOVE-METHOD must return its generic function argument, even if the method isn't one of the generic function's. Caught by PFD ansi-tests --- diff --git a/NEWS b/NEWS index 39830be..d421f3f 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,9 @@ ;;;; -*- coding: utf-8; -*- +changes in sbcl-0.9.12 relative to sbcl-0.9.11: + * fixed some bugs revealed by Paul Dietz' test suite: + ** REMOVE-METHOD returns its generic function argument even when + the method is not one of the generic functions' methods. + changes in sbcl-0.9.11 relative to sbcl-0.9.10: * new platform: experimental support for SBCL x86/Darwin, including MacOS X 10.4.5 on Intel. diff --git a/src/pcl/methods.lisp b/src/pcl/methods.lisp index 3fb6cd2..3358df9 100644 --- a/src/pcl/methods.lisp +++ b/src/pcl/methods.lisp @@ -573,7 +573,7 @@ generic-function))) (defun real-remove-method (generic-function method) - (when (eq generic-function (method-generic-function method)) + (when (eq generic-function (method-generic-function method)) (let* ((name (generic-function-name generic-function)) (specializers (method-specializers method)) (methods (generic-function-methods generic-function)) @@ -590,8 +590,8 @@ (map-dependents generic-function (lambda (dep) (update-dependent generic-function - dep 'remove-method method))) - generic-function))) + dep 'remove-method method))))) + generic-function) (defun compute-applicable-methods-function (generic-function arguments) (values (compute-applicable-methods-using-types diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index 5bdccb2..c415f1a 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -1256,4 +1256,16 @@ (assert (not (typep-backwards-3 (make-instance 'backwards-2)))) (assert (typep-backwards-3 (make-instance 'backwards-3))) +(defgeneric remove-method-1 (x) + (:method ((x integer)) (1+ x))) +(defgeneric remove-method-2 (x) + (:method ((x integer)) (1- x))) +(assert (eq #'remove-method-1 + (remove-method #'remove-method-1 + (find-method #'remove-method-2 + nil + (list (find-class 'integer)))))) +(assert (= (remove-method-1 3) 4)) +(assert (= (remove-method-2 3) 2)) + ;;;; success diff --git a/version.lisp-expr b/version.lisp-expr index 977f2ac..92d7606 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.9.11" +"0.9.11.1"