X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fclos.impure.lisp;h=4184438b5290f7f68a9c89f85658c4658c277c94;hb=dc2b10f2cc464b6d0003c3adc4541c3895eebbd5;hp=cf876d9249dccffee1de3fa7a0b0e9affa9cc8c6;hpb=44947befbbe3cef262484c265903599109c4dad6;p=sbcl.git diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index cf876d9..4184438 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -1901,4 +1901,42 @@ (sb-pcl::generic-function-pretty-arglist #'generic-function-pretty-arglist-optional-and-key))))) +(with-test (:name :bug-894202) + (assert (eq :good + (handler-case + (let ((name (gensym "FOO")) + (decl (gensym "BAR"))) + (eval `(defgeneric ,name () + (declare (,decl))))) + (warning () + :good))))) + +(with-test (:name :bug-898331) + (handler-bind ((warning #'error)) + (eval `(defgeneric bug-898331 (request type remaining-segment-requests all-requests))) + (eval `(defmethod bug-898331 ((request cons) (type (eql :cancel)) + remaining-segment-requests + all-segment-requests) + (declare (ignore all-segment-requests)) + (check-type request t))))) + +(with-test (:name :bug-1001799) + ;; compilation of the defmethod used to cause infinite recursion + (let ((pax (gensym "PAX")) + (pnr (gensym "PNR")) + (sup (gensym "SUP")) + (frob (gensym "FROB")) + (sb-ext:*evaluator-mode* :compile)) + (eval + `(progn + (declaim (optimize (speed 1) (space 1) (safety 3) (debug 3) (compilation-speed 1))) + (defclass ,pax (,sup) + ((,pnr :type (or null ,pnr)))) + (defclass ,pnr (,sup) + ((,pax :type (or null ,pax)))) + (defclass ,sup () + ()) + (defmethod ,frob ((pnr ,pnr)) + (slot-value pnr ',pax)))))) + ;;;; success