X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Floop.pure.lisp;h=6d5f3e4739207891390b594a0e1ffa49d92a6f4b;hb=952798e77d09b8dcc27d8eea4f22cab552528ae7;hp=408d18be7ad587e3af7af12ed5bf0d78f783e630;hpb=a4d62423bfe3c71420a6eef8bd702f4001991a9c;p=sbcl.git diff --git a/tests/loop.pure.lisp b/tests/loop.pure.lisp index 408d18b..6d5f3e4 100644 --- a/tests/loop.pure.lisp +++ b/tests/loop.pure.lisp @@ -224,3 +224,15 @@ (y (list nil 2 nil))) (declare (special x y)) (assert (= (funcall fn) 2)))) + +;;; Incorrect LIST type declaration, reported and patched by Teemu +;;; Kalvas: end testing is done "as if by atom" so this is supposed +;;; to work. +(assert (equal '(1 2) (loop for (a . b) on '(1 2 . 3) collect a))) + +;;; Detection of duplicate bindings, reported by Bruno Haible for CMUCL. +(multiple-value-bind (_ condition) + (ignore-errors + (macroexpand '(LOOP WITH A = 0 FOR A DOWNFROM 10 TO 0 DO (PRINT A)))) + (declare (ignore _)) + (assert (typep condition 'program-error)))