From bbe6aea96f26dc843b95c7091e1180f5d53bfbfe Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Tue, 5 Oct 2004 21:55:12 +0000 Subject: [PATCH] FOR-AS-ON-LIST is specified over lists, not proper lists, so remove the declaration on the list. Fixes the bug reported by Frode Vatvedt Fjeld on cmucl-imp, 2004/09/06: (compile (defun f (x) (loop for (a . b) on x collect a))) (f '(1 2 . 3)) => error It should return '(1 2). --- code/loop.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/loop.lisp b/code/loop.lisp index f3393a963..1f427868e 100644 --- a/code/loop.lisp +++ b/code/loop.lisp @@ -49,7 +49,7 @@ #+cmu (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/loop.lisp,v 1.24 2004/01/18 13:47:55 toy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/loop.lisp,v 1.25 2004/10/05 21:55:12 rtoy Exp $") ;;;; LOOP Iteration Macro @@ -1696,7 +1696,7 @@ collected result will be returned as the value of the LOOP." (multiple-value-bind (list constantp list-value) (loop-constant-fold-if-possible val) (let ((listvar var)) (cond ((and var (symbolp var)) (loop-make-iteration-variable var list data-type)) - (t (loop-make-variable (setq listvar (loop-gentemp)) list 'list) + (t (loop-make-variable (setq listvar (loop-gentemp)) list 't) (loop-make-iteration-variable var nil data-type))) (multiple-value-bind (list-step step-function) (loop-list-step listvar) (declare #+(and (not LOOP-Prefer-POP) (not CLOE)) (ignore step-function)) -- GitLab