mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-16 06:12:25 -08:00
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:
parent
a9a110f211
commit
02db89a9bc
1 changed files with 8 additions and 7 deletions
|
|
@ -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)))))))
|
||||
)
|
||||
|
||||
;;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue