0.9.11.1:
authorChristophe Rhodes <csr21@cam.ac.uk>
Mon, 27 Mar 2006 08:13:03 +0000 (08:13 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Mon, 27 Mar 2006 08:13:03 +0000 (08:13 +0000)
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

NEWS
src/pcl/methods.lisp
tests/clos.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 39830be..d421f3f 100644 (file)
--- 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.
index 3fb6cd2..3358df9 100644 (file)
         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))
       (map-dependents generic-function
                       (lambda (dep)
                         (update-dependent generic-function
-                                          dep 'remove-method method)))
-      generic-function)))
+                                          dep 'remove-method method)))))
+  generic-function)
 \f
 (defun compute-applicable-methods-function (generic-function arguments)
   (values (compute-applicable-methods-using-types
index 5bdccb2..c415f1a 100644 (file)
 (assert (not (typep-backwards-3 (make-instance 'backwards-2))))
 (assert (typep-backwards-3 (make-instance 'backwards-3)))
 \f
+(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))
+\f
 ;;;; success
index 977f2ac..92d7606 100644 (file)
@@ -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"