mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-11 11:42:51 -08:00
LOOP REPEAT recognizes the type of the iterator variable
This commit is contained in:
parent
09ae1f43c0
commit
8046f644dd
1 changed files with 2 additions and 2 deletions
|
|
@ -1646,8 +1646,8 @@ collected result will be returned as the value of the LOOP."
|
|||
|
||||
(defun loop-do-repeat ()
|
||||
(loop-disallow-conditional :repeat)
|
||||
(let ((form (loop-get-form))
|
||||
(type 'real))
|
||||
(let* ((form (loop-get-form))
|
||||
(type (if (fixnump form) 'fixnum 'real)))
|
||||
(let ((var (loop-make-variable (gensym) form type)))
|
||||
(push `(when (minusp (decf ,var)) (go end-loop)) *loop-before-loop*)
|
||||
(push `(when (minusp (decf ,var)) (go end-loop)) *loop-after-body*)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue