X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fclos.impure.lisp;h=174e3289be1662203ddb0b263fbe2af68cd6d28f;hb=ed891a4fd882d1b9fe066ab14bcf2107aea95baa;hp=3fa764a64347ec8a4fa445e68c190a7e4d2bf8ef;hpb=1913e44aa31172eb3c345115a2acb367356f6b4b;p=sbcl.git diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index 3fa764a..174e328 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -1597,5 +1597,27 @@ (assert (not (sb-pcl::layout-for-std-class-p (sb-pcl::find-layout 'warning)))) (assert (not (sb-pcl::layout-for-std-class-p (sb-pcl::find-layout 'hash-table)))) (assert (eq t (sb-pcl::layout-for-std-class-p (sb-pcl::find-layout 'standard-object)))) + +;;;; bug 402: PCL used to warn about non-standard declarations +(declaim (declaration bug-402-d)) +(defgeneric bug-402-gf (x)) +(with-test (:name :bug-402) + (handler-bind ((warning #'error)) + (eval '(defmethod bug-402-gf (x) + (declare (bug-402-d x)) + x)))) + +;;;; non-keyword :default-initargs + :before method on shared initialize +;;;; interacted badly with CTOR optimizations +(defclass ctor-default-initarg-problem () + ((slot :initarg slotto)) + (:default-initargs slotto 123)) +(defmethod shared-initialize :before ((instance ctor-default-initarg-problem) slot-names &rest initargs) + (format t "~&Rock on: ~A~%" initargs)) +(defun provoke-ctor-default-initarg-problem () + (make-instance 'ctor-default-initarg-problem)) +(handler-bind ((warning #'error)) + (assert (= 123 (slot-value (provoke-ctor-default-initarg-problem) 'slot)))) + ;;;; success