X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fdefstruct.impure.lisp;h=1354ab60174d828c90f7b9250d2f70e5374178bb;hb=b67c2d7522c0b73a18e316faa2b81d7c8b187706;hp=7f2ba08bf27f8c6804901ac931a7a48144622215;hpb=b002696f4d26c41ea09fc9af296a2d1f10b2ebb6;p=sbcl.git diff --git a/tests/defstruct.impure.lisp b/tests/defstruct.impure.lisp index 7f2ba08..1354ab6 100644 --- a/tests/defstruct.impure.lisp +++ b/tests/defstruct.impure.lisp @@ -1065,3 +1065,21 @@ redefinition." (with-test (:name defstruct-copier-typechecks-argument) (assert (not (raises-error? (copy-person (make-astronaut :name "Neil"))))) (assert (raises-error? (copy-astronaut (make-person :name "Fred"))))) + +(with-test (:name :bug-528807) + (let ((*evaluator-mode* :compile)) + (handler-bind ((style-warning #'error)) + (eval `(defstruct (bug-528807 (:constructor make-528807 (&aux x))) + (x nil :type fixnum)))))) + +(with-test (:name :bug-520607) + (assert + (raises-error? + (eval '(defstruct (typed-struct (:type list) (:predicate typed-struct-p)) + (a 42 :type fixnum))))) + ;; NIL is ok, though. + (eval '(defstruct (typed-struct (:type list) (:predicate nil)) + (a 42 :type fixnum))) + ;; So's empty. + (eval '(defstruct (typed-struct2 (:type list) (:predicate)) + (a 42 :type fixnum))))