[armedbear-cvs] r14290 - branches/1.1.x/src/org/armedbear/lisp

mevenson at common-lisp.net mevenson at common-lisp.net
Tue Dec 4 17:00:00 UTC 2012


Author: mevenson
Date: Tue Dec  4 08:59:59 2012
New Revision: 14290

Log:
abcl-1.1.x: Backport r14289.

Don't shortcut add-method for subclasses of standard-generic-function

- Fixes #276

- Reported by Pascal Costanza

Modified:
   branches/1.1.x/src/org/armedbear/lisp/clos.lisp

Modified: branches/1.1.x/src/org/armedbear/lisp/clos.lisp
==============================================================================
--- branches/1.1.x/src/org/armedbear/lisp/clos.lisp	Tue Dec  4 08:36:39 2012	(r14289)
+++ branches/1.1.x/src/org/armedbear/lisp/clos.lisp	Tue Dec  4 08:59:59 2012	(r14290)
@@ -1718,7 +1718,7 @@
         ;; Remove methods defined by previous DEFGENERIC forms, as
         ;; specified by CLHS, 7.7 (Macro DEFGENERIC).
         (dolist (method (generic-function-initial-methods gf))
-          (if (typep gf 'standard-generic-function)
+          (if (eq  (class-of gf) +the-standard-generic-function-class+)
               (progn
                 (std-remove-method gf method)
                 (map-dependents gf
@@ -2125,7 +2125,9 @@
            (if (eq (generic-function-method-class gf) +the-standard-method-class+)
                (apply #'make-instance-standard-method gf all-keys)
                (apply #'make-instance (generic-function-method-class gf) all-keys))))
-      (if (eq (generic-function-method-class gf) +the-standard-method-class+)
+      (if (and
+           (eq (generic-function-method-class gf) +the-standard-method-class+)
+           (eq (class-of gf) +the-standard-generic-function-class+))
           (progn
             (std-add-method gf method)
             (map-dependents gf




More information about the armedbear-cvs mailing list