|
[Sbcl-commits] CVS: sbcl/tests clos.impure.lisp,1.77,1.78
From: Christophe Rhodes <crhodes@us...> - 2006-03-27 08:13
|
Update of /cvsroot/sbcl/sbcl/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23973/tests Modified Files: clos.impure.lisp Log Message: 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 Index: clos.impure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/clos.impure.lisp,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- clos.impure.lisp 10 Mar 2006 17:40:27 -0000 1.77 +++ clos.impure.lisp 27 Mar 2006 08:13:07 -0000 1.78 @@ -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 |
| Thread | Author | Date |
|---|---|---|
| [Sbcl-commits] CVS: sbcl/tests clos.impure.lisp,1.77,1.78 | Christophe Rhodes <crhodes@us...> |