silent non-toplevel DEFSTRUCT
[sbcl.git] / tests / defstruct.impure.lisp
index 5e5ed66..f9b4145 100644 (file)
@@ -1121,3 +1121,9 @@ redefinition."
 (with-test (:name (:struct-predicate :obsolete-instance))
   (defclass class-to-be-redefined () ((a :initarg :a :initform 1)))
   (function-trampoline #'structure-with-predicate-p))
+
+(with-test (:name (:defstruct :not-toplevel-silent))
+  (let ((sb-ext:*evaluator-mode* :compile))
+    (handler-bind ((warning #'error))
+     (eval `(let ()
+              (defstruct destruct-no-warning-not-at-toplevel bar))))))