X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fclos.impure.lisp;h=9c179fc00fa61696f744f94ea459a6ca39e85237;hb=7abb9e44907ef12b52ac26d6482fbe21c036ee9b;hp=7ef3e466b2a298b8d166766b8cb2510e57788d0d;hpb=d71896ded395b8453794f0c2e121af1cd095de8b;p=sbcl.git diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index 7ef3e46..9c179fc 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -784,5 +784,32 @@ (assert (eq (find-class 'one-more-to-obsolete) (make-instances-obsolete (find-class 'one-more-to-obsolete)))) +;;; Sensible error instead of a BUG. Reported by Thomas Burdick. +(multiple-value-bind (value err) + (ignore-errors + (defclass slot-def-with-duplicate-accessors () + ((slot :writer get-slot :reader get-slot)))) + (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)