X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fclos.impure.lisp;h=8e6d4141c63ccc1bacdfe8d58a0e5c1d5fafed30;hb=60d2531e0a12daa5a43e390affe9260688b17d21;hp=2f36ac78f1daea0756eefc0c7ebe5d8fa7b12244;hpb=6e9a24de5c5e926eef9b152417ae63fc4436953b;p=sbcl.git diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index 2f36ac7..8e6d414 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -70,7 +70,7 @@ (assert (expect-error (defgeneric foo2 (x a &rest)))) (defgeneric foo3 (x &rest y)) (defmethod foo3 ((x t) &rest y) nil) -(defmethod foo4 ((x t) &key y &rest z) nil) +(defmethod foo4 ((x t) &rest z &key y) nil) (defgeneric foo4 (x &rest z &key y)) (assert (expect-error (defgeneric foo5 (x &rest)))) (assert (expect-error (macroexpand-1 '(defmethod foo6 (x &rest))))) @@ -333,7 +333,18 @@ ((#1a() :initarg :a)))) (assert-program-error (defclass foo012 () ((t :initarg :t)))) - (assert-program-error (defclass foo013 () ("a")))) + (assert-program-error (defclass foo013 () ("a"))) + ;; specialized lambda lists have certain restrictions on ordering, + ;; repeating keywords, and the like: + (assert-program-error (defmethod foo014 ((foo t) &rest) nil)) + (assert-program-error (defmethod foo015 ((foo t) &rest x y) nil)) + (assert-program-error (defmethod foo016 ((foo t) &allow-other-keys) nil)) + (assert-program-error (defmethod foo017 ((foo t) + &optional x &optional y) nil)) + (assert-program-error (defmethod foo018 ((foo t) &rest x &rest y) nil)) + (assert-program-error (defmethod foo019 ((foo t) &rest x &optional y) nil)) + (assert-program-error (defmethod foo020 ((foo t) &key x &optional y) nil)) + (assert-program-error (defmethod foo021 ((foo t) &key x &rest y) nil))) ;;; DOCUMENTATION's argument-precedence-order wasn't being faithfully ;;; preserved through the bootstrap process until sbcl-0.7.8.39.