X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Feval.impure.lisp;h=2e6d502990b1c4b5b8eceb4ba721c7be4f1ab12f;hb=37200d73dfca16507809778574092cfb998711d5;hp=a3db89d20cef29a46f106179dc1852adeeda36e7;hpb=37b5fc474cf0b4d739c12fc0356667a16006d217;p=sbcl.git diff --git a/tests/eval.impure.lisp b/tests/eval.impure.lisp index a3db89d..2e6d502 100644 --- a/tests/eval.impure.lisp +++ b/tests/eval.impure.lisp @@ -220,4 +220,21 @@ (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