LOOP macro accepts two or more REPEAT constructs
Bug #653097 reported by
Roman Marynchak
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Triaged
|
Low
|
Unassigned |
Bug Description
This code in REPL
(loop repeat 1 repeat 2 do (print 1))
yields
* (loop repeat 1 repeat 2 do (print 1))
1
NIL
*
CLHS, section 6.1.4 says that "The repeat construct causes iteration to terminate after a specified number of times. The loop body executes n times, where n is the value of the expression form. The form argument is evaluated one time in the loop prologue".
In case there are two REPEATs, which one controls the loop? I guess that a warning (if not an error) should be emitted in any case.
Changed in sbcl: | |
importance: | Undecided → Low |
status: | New → Triaged |
tags: | added: loop |
To post a comment you must log in.
As discussed on #sbcl, there should be a style-warning when the repeats arguments are constants, but in general multiple REPEATs are allowed.