From 06333e9fbc30caf953a7510b8d51c71ab8637a72 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Wed, 17 Mar 2010 11:53:29 +0000 Subject: [PATCH] 1.0.36.26: bug using OF-TYPE VECTOR in LOOP Case of :ELEMENT-TYPE * vs T confusion. Fixes launchpad bug #540186. --- NEWS | 3 ++- src/code/loop.lisp | 3 ++- tests/loop.pure.lisp | 9 +++++++++ version.lisp-expr | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 5a97866..c91a356 100644 --- a/NEWS +++ b/NEWS @@ -37,7 +37,7 @@ changes relative to sbcl-1.0.36: SB-EXT:RESTRICT-COMPILER-POLICY into account. (lp#313337) * bug fix: Comma inside a backquoted array or structure resulted in nonsense values instead of signaling an error. (lp#309093) - * bug fix: Spurious unused variale warning in a DEFSTRUCT edge case. + * bug fix: Spurious unused variable warning in a DEFSTRUCT edge case. (lp#528807) * bug fix: More consistent warnings and notes for ignored DYNAMIC-EXTENT declarations (lp#497321) @@ -45,6 +45,7 @@ changes relative to sbcl-1.0.36: and failed to detect circular lists (lp#452008) * bug fix: leakage from ~/.asdf-install into the ASDf-INSTALL contrib build (lp#538974) + * bug fix: LOOP OF-TYPE VECTOR compile-time error. (lp#540186) changes in sbcl-1.0.36 relative to sbcl-1.0.35: * new feature: SB-EXT:TYPEXPAND-1, SB-EXT:TYPEXPAND, and diff --git a/src/code/loop.lisp b/src/code/loop.lisp index e2df9b8..eea95f8 100644 --- a/src/code/loop.lisp +++ b/src/code/loop.lisp @@ -938,7 +938,8 @@ code to be loaded. ((sb!xc:subtypep data-type 'vector) (let ((ctype (sb!kernel:specifier-type data-type))) (when (sb!kernel:array-type-p ctype) - (let ((etype (sb!kernel:array-type-element-type ctype))) + (let ((etype (sb!kernel:type-*-to-t + (sb!kernel:array-type-specialized-element-type ctype)))) (make-array 0 :element-type (sb!kernel:type-specifier etype)))))) (t nil))) diff --git a/tests/loop.pure.lisp b/tests/loop.pure.lisp index 44853c9..84a833a 100644 --- a/tests/loop.pure.lisp +++ b/tests/loop.pure.lisp @@ -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")))))) diff --git a/version.lisp-expr b/version.lisp-expr index 240c8c6..198ef83 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.36.25" +"1.0.36.26" -- 1.7.10.4