DOTIMES does not check that count-form yields an integer
Bug #619393 reported by
Roman Marynchak
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Low
|
Unassigned |
Bug Description
This code
(dotimes (x 7.7) (print x))
should fail to execute in REPL, because 7.7 is not of type INTEGER. CLHS is clear about it: "dotimes evaluates count-form, which should produce an integer", but SBCL and CLISP have the bug - they seem to use NUMBERP, and x gets printed.
Changed in sbcl: | |
status: | New → Confirmed |
importance: | Undecided → Low |
Changed in sbcl: | |
assignee: | Roman Marynchak (roman-marynchak) → Nikodemus Siivola (nikodemus) |
Changed in sbcl: | |
assignee: | Nikodemus Siivola (nikodemus) → nobody |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The simple fix - use strict INTEGERP instead of NUMBERP.
The test is coming soon.