X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.impure.lisp;h=f36f860bcffcee1aeb6f7791ca9b10e3d2148372;hb=d76c81b0ca4dcfc99f0cd805f5c20493fa80b2b6;hp=9a2aed6a25681dcbf36e505df55cb106325c731a;hpb=ec735ab75335c1744b39190314142a7e6f1ecdb3;p=sbcl.git diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index 9a2aed6..f36f860 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -763,6 +763,34 @@ 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))) + +;;; bug which existed in 0.8alpha.0.4 for several milliseconds before +;;; APD fixed it in 0.8alpha.0.5 +(defun frob8alpha04 (x y) + (+ x y)) +(defun baz8alpha04 (this kids) + (flet ((n-i (&rest rest) + ;; Removing the #+NIL here makes the bug go away. + #+nil (format t "~&in N-I REST=~S~%" rest) + (apply #'frob8alpha04 this rest))) + (n-i kids))) +;;; failed in 0.8alpha.0.4 with "The value 13 is not of type LIST." +(assert (= (baz8alpha04 12 13) 25)) + ;;;; tests not in the problem domain, but of the consistency of the ;;;; compiler machinery itself