X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Floop.pure.lisp;h=66f7f349102712c89a381f50d6e07a3aca7a98d8;hb=9a241987c408980164f71237f7d840265302bbc1;hp=4aa64abecca428faf2487ff5ff1396c9d9ff18ae;hpb=f4f18b9dcdaf1948947b1747f5bfa766a1a0ee4c;p=sbcl.git diff --git a/tests/loop.pure.lisp b/tests/loop.pure.lisp index 4aa64ab..66f7f34 100644 --- a/tests/loop.pure.lisp +++ b/tests/loop.pure.lisp @@ -22,3 +22,35 @@ collect key) #'string<)) '(key1 key2))) + +;;; Bug 81, reported by Wolfhard Buss on cmucl-help 2001-02-14, was +;;; fixed by Alexey Dejneka's patch on sbcl-devel 2001-09-30. +(assert (equal '(0.0 1.0 2.0 3.0) + (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))