The macro expander for DOLIST uses only LET, not SETQ. This way the type declarations are not incompatible with the initial values of the loop.

This commit is contained in:
Juan Jose Garcia Ripoll 2011-12-23 19:41:39 +01:00
parent a9a110f211
commit 02db89a9bc

View file

@ -182,15 +182,16 @@
list-var
`(the cons ,list-var))))
`(block nil
(let* ((,list-var ,expression)
,var)
(declare ,@declarations)
(let* ((,list-var ,expression))
(si::while ,list-var
(setq ,var (first ,typed-var))
,@body
(let ((,var (first ,typed-var)))
(declare ,@declarations)
,@body)
(setq ,list-var (rest ,typed-var)))
,(when output-form `(setq ,var nil))
,output-form)))))
,(when output-form
`(let ((,var nil))
(declare ,@declarations)
,output-form)))))))
)
;;;