1.0.21.10: DEFINE-COMPILER-MACRO and destructuring lambda-lists
[sbcl.git] / tests / eval.impure.lisp
index a3db89d..2e6d502 100644 (file)
       (tagbody (go NIL) NIL) t)
     (assert (tagbody-nil-is-valid-tag))))
 
+;;; top-level DECLARE is formally undefined, but we want it to raise
+;;; an error rather than silently return NIL.
+(defvar *scratch*)
+(with-test (:name :toplevel-declare)
+  (assert (raises-error? (eval '(declare (type pathname *scratch*))))))
+
+(with-test (:name (eval no-compiler-notes))
+  (handler-bind ((sb-ext:compiler-note #'error))
+    (let ((sb-ext:*evaluator-mode* :compile))
+      (eval '(let ((x 42))
+              (if nil x)))
+      (eval '(let ((* 13))
+              (let ((x 42)
+                    (y *))
+                (declare (optimize speed))
+                (+ x y)))))))
+
 ;;; success