X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fclos.impure.lisp;h=56fb8c374a5370f9c7dcc4ce650799528535b67b;hb=4ce92c253dbf6a5275ef3cafc193add284bc9795;hp=412948e2cbcc8f9c4aa13ee52c41bdf3ba86c64d;hpb=6e9a41e3ec4205f3a6e02ba50ff36f4159a3dfd9;p=sbcl.git diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index 412948e..56fb8c3 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -1864,4 +1864,28 @@ (cacheing-initargs-redefinitions-check-fun :slot2) (let ((thing (cacheing-initargs-redefinitions-check-fun :slot))) (assert (not (slot-boundp thing 'slot))))) + +(with-test (:name :defmethod-specializer-builtin-class-alias) + (let ((alias (gensym))) + (setf (find-class alias) (find-class 'symbol)) + (eval `(defmethod lp-618387 ((s ,alias)) + (symbol-name s))) + (assert (equal "FOO" (funcall 'lp-618387 :foo))))) + +(with-test (:name :pcl-spurious-ignore-warnings) + (defgeneric no-spurious-ignore-warnings (req &key key)) + (handler-bind ((warning (lambda (x) (error "~A" x)))) + (eval + '(defmethod no-spurious-ignore-warnings ((req number) &key key) + (declare (ignore key)) + (check-type req integer)))) + (defgeneric should-get-an-ignore-warning (req &key key)) + (let ((warnings 0)) + (handler-bind ((warning (lambda (c) (setq warnings 1) (muffle-warning c)))) + (eval '(defmethod should-get-an-ignore-warning ((req integer) &key key) + (check-type req integer)))) + (assert (= warnings 1)))) + + + ;;;; success