X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Floop.pure.lisp;h=9e6a2dbba1d57041e27522644a8bb322f9af0be1;hb=d94c1b4a8c534bde146823f56558faf37cd4c4d7;hp=44853c9d818ffe0cbe3dce931e793bed10a04755;hpb=601ac63712c45d18d3c29571d571fd57c8b681a2;p=sbcl.git diff --git a/tests/loop.pure.lisp b/tests/loop.pure.lisp index 44853c9..9e6a2db 100644 --- a/tests/loop.pure.lisp +++ b/tests/loop.pure.lisp @@ -247,3 +247,29 @@ (loop with x of-type (simple-vector 1) = (make-array '(1)) repeat 1 return x) + +(with-test (:name :bug-540186) + (let ((fun (compile nil `(lambda (x) + (loop for i from 0 below (length x) + for vec of-type vector = (aref x i) + collect vec))))) + (assert (equal '("foo" "bar") + (funcall fun + (vector "foo" "bar")))))) + +(with-test (:name :bug-lp613871) + (multiple-value-bind (function warnings-p failure-p) + (compile nil '(lambda () (loop with nil = 1 repeat 2 collect t))) + (assert (null warnings-p)) + (assert (null failure-p)) + (assert (equal '(t t) (funcall function)))) + (multiple-value-bind (function warnings-p failure-p) + (compile nil '(lambda () (loop with nil repeat 2 collect t))) + (assert (null warnings-p)) + (assert (null failure-p)) + (assert (equal '(t t) (funcall function))))) + +(with-test (:name :bug-654220-regression) + (assert (= 32640 (loop for i to 255 + sum i into sum of-type fixnum + finally (return sum)))))