X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.impure.lisp;h=d904439e95175b0765d6c5a65dbcb307d48aab4a;hb=41d85303c73124856e193aea2c15f4e8f5bb9ec8;hp=9a2aed6a25681dcbf36e505df55cb106325c731a;hpb=ec735ab75335c1744b39190314142a7e6f1ecdb3;p=sbcl.git diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index 9a2aed6..d904439 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -763,6 +763,21 @@ BUG 48c, not yet fixed: (when x (assert (= (funcall (compile nil x) 1) 2)))) +;;; Bug reported by reported by rif on c.l.l 2003-03-05 +(defun test-type-of-special-1 (x) + (declare (special x) + (fixnum x) + (optimize (safety 3))) + (list x)) +(defun test-type-of-special-2 (x) + (declare (special x) + (fixnum x) + (optimize (safety 3))) + (list x (setq x (/ x 2)) x)) +(assert (raises-error? (test-type-of-special-1 3/2) type-error)) +(assert (raises-error? (test-type-of-special-2 3) type-error)) +(assert (equal (test-type-of-special-2 8) '(8 4 4))) + ;;;; tests not in the problem domain, but of the consistency of the ;;;; compiler machinery itself