From: Christophe R. <cr...@us...> - 2004-05-24 14:28:32
|
Update of /cvsroot/sbcl/sbcl/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27273/tests Modified Files: clos.impure.lisp Log Message: 0.8.10.52: Fix bug #321 (define-method-combination :arguments lambda lists) ... add FIXME note that there are $n+2$ PARSE-LAMBDA-LISToid functions lying around Index: clos.impure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/clos.impure.lisp,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- clos.impure.lisp 20 May 2004 22:56:43 -0000 1.52 +++ clos.impure.lisp 24 May 2004 14:28:21 -0000 1.53 @@ -792,5 +792,24 @@ (assert (typep err 'error)) (assert (not (typep err 'sb-int:bug)))) +;;; BUG 321: errors in parsing DEFINE-METHOD-COMBINATION arguments +;;; lambda lists. + +(define-method-combination w-args () + ((method-list *)) + (:arguments arg1 arg2 &aux (extra :extra)) + `(progn ,@(mapcar (lambda (method) `(call-method ,method)) method-list))) +(defgeneric mc-test-w-args (p1 p2 s) + (:method-combination w-args) + (:method ((p1 number) (p2 t) s) + (vector-push-extend (list 'number p1 p2) s)) + (:method ((p1 string) (p2 t) s) + (vector-push-extend (list 'string p1 p2) s)) + (:method ((p1 t) (p2 t) s) (vector-push-extend (list t p1 p2) s))) +(let ((v (make-array 0 :adjustable t :fill-pointer t))) + (assert (= (mc-test-w-args 1 2 v) 1)) + (assert (equal (aref v 0) '(number 1 2))) + (assert (equal (aref v 1) '(t 1 2)))) + ;;;; success (sb-ext:quit :unix-status 104) |