Update of /cvsroot/sbcl/sbcl/tests
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25308/tests
Modified Files:
loop.pure.lisp
Log Message:
1.0.36.26: bug using OF-TYPE VECTOR in LOOP
Case of :ELEMENT-TYPE * vs T confusion.
Fixes launchpad bug #540186.
Index: loop.pure.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/tests/loop.pure.lisp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- loop.pure.lisp 27 Mar 2009 00:39:39 -0000 1.24
+++ loop.pure.lisp 17 Mar 2010 11:53:30 -0000 1.25
@@ -247,3 +247,12 @@
(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"))))))
|