X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.pure-cload.lisp;h=d5eede613693257d01fb3a49c9286927e4b83d7c;hb=69ef68ba7393e3492c1b4a756d1140f71c2922bc;hp=854c1a5bd0eb14f51f2ca61d791f0fb34fba0eaa;hpb=504959cef381a69a727263ba2a70108f133f8900;p=sbcl.git diff --git a/tests/compiler.pure-cload.lisp b/tests/compiler.pure-cload.lisp index 854c1a5..d5eede6 100644 --- a/tests/compiler.pure-cload.lisp +++ b/tests/compiler.pure-cload.lisp @@ -125,13 +125,13 @@ ;;; Verify type checking policy in full calls: the callee is supposed ;;; to perform check, but the results should not be used before the ;;; check will be actually performed. -#+nil (locally (declare (optimize (safety 3))) (flet ((bar (f a) (declare (type (simple-array (unsigned-byte 32) (*)) a)) (declare (type (function (fixnum)) f)) (funcall f (aref a 0)))) + #-x86-64 (assert (eval `(let ((n (1+ most-positive-fixnum))) (if (not (typep n '(unsigned-byte 32))) @@ -144,3 +144,16 @@ (make-array 1 :element-type '(unsigned-byte 32) :initial-element n)) nil))))))) + +;;; bug 261 +(let ((x (list (the (values &optional fixnum) (eval '(values)))))) + (assert (equal x '(nil)))) + +;;; Bug 125, reported by Gabe Garza: Python did not preserve identity +;;; of closures. +(flet ((test-case (test-pred x) + (let ((func (lambda () x))) + (list (eq func func) + (funcall test-pred func func) + (delete func (list func)))))) + (assert (equal '(t t nil) (funcall (eval #'test-case) #'eq 3))))