X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Floop.pure.lisp;h=66f7f349102712c89a381f50d6e07a3aca7a98d8;hb=ed7ba4dad8a79726fdfeba5aa12e276ea852c540;hp=46a38e86e08d1226817e618d52a9a30d16052017;hpb=2d75f4246b8451a9c2c95cd36673d98c82c9845f;p=sbcl.git diff --git a/tests/loop.pure.lisp b/tests/loop.pure.lisp index 46a38e8..66f7f34 100644 --- a/tests/loop.pure.lisp +++ b/tests/loop.pure.lisp @@ -29,3 +29,28 @@ (loop with (a . b) of-type float = '(0.0 . 1.0) and (c . d) of-type float = '(2.0 . 3.0) return (list a b c d)))) + +;;; a bug reported and fixed by Alexey Dejneka sbcl-devel 2001-10-05: +;;; The type declarations should apply, hence under Python's +;;; declarations-are-assertions rule, the code should signal a type +;;; error. +(assert (typep (nth-value 1 + (ignore-errors + (funcall (lambda () + (loop with (a . b) + of-type float = '(5 . 5) + return (list a b)))))) + 'type-error)) + +;;; bug 103, reported by Arthur Lemmens sbcl-devel 2001-05-05, +;;; fixed by Alexey Dejneka patch sbcl-devel 2001-10-05: +;;; LOOP syntax requires that forms after INITIALLY, FINALLY, and DO +;;; must be compound forms. +(multiple-value-bind (function warnings-p failure-p) + (compile nil + '(lambda () + (loop while t do + *print-level* + (print t)))) + (declare (ignore function warnings-p)) + (assert failure-p))