X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.impure.lisp;h=9a2aed6a25681dcbf36e505df55cb106325c731a;hb=3a8bfcb01abe4d8eeb9ef1343d623dbbf57c19d9;hp=dbb24203606415d421a82fa4201a701e27f462c8;hpb=9ce73d3eeef7ed9dda2f8029c5f42cc17798ad51;p=sbcl.git diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index dbb2420..9a2aed6 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -404,21 +404,22 @@ BUG 48c, not yet fixed: (declare (ignore result)) (assert (typep condition 'type-error))) -;;; bug 110: the compiler flushed the argument type test and the default -;;; case in the cond. - -(defun bug110 (x) - (declare (optimize (safety 2) (speed 3))) - (declare (type (or string stream) x)) - (cond ((typep x 'string) 'string) - ((typep x 'stream) 'stream) - (t - 'none))) - -(multiple-value-bind (result condition) - (ignore-errors (bug110 0)) - (declare (ignore result)) - (assert (typep condition 'type-error))) +;;;; bug 110: the compiler flushed the argument type test and the default +;;;; case in the cond. +; +;(locally (declare (optimize (safety 3) (speed 2))) +; (defun bug110 (x) +; (declare (optimize (safety 2) (speed 3))) +; (declare (type (or string stream) x)) +; (cond ((typep x 'string) 'string) +; ((typep x 'stream) 'stream) +; (t +; 'none)))) +; +;(multiple-value-bind (result condition) +; (ignore-errors (bug110 0)) +; (declare (ignore result)) +; (assert (typep condition 'type-error))) ;;; bug 202: the compiler failed to compile a function, which derived ;;; type contradicted declared. @@ -751,6 +752,17 @@ BUG 48c, not yet fixed: (declare (type (vector (unsigned-byte 8)) x)) (setq *y* (the (unsigned-byte 8) (aref x 4)))) +;;; FUNCTION-LAMBDA-EXPRESSION should return something that's COMPILE +;;; can understand. Here's a simple test for that on a function +;;; that's likely to return a hairier list than just a lambda: +(macrolet ((def (fn) `(progn + (declaim (inline ,fn)) + (defun ,fn (x) (1+ x))))) + (def bug228)) +(let ((x (function-lambda-expression #'bug228))) + (when x + (assert (= (funcall (compile nil x) 1) 2)))) + ;;;; tests not in the problem domain, but of the consistency of the ;;;; compiler machinery itself