No tests for loop variable type declaration?
From http://www.lispworks.com/documentation/HyperSpec/Body/m_loop.htm,
the for-as-arithmetic clause can be var [type-spec] for-as-arithmetic-subclause
where type-spec
can be a
simple-type-spec
which is just one of fixnum
, float
, t
, or
nil
.
AFAICT, there are no tests for this. I did some experiments with
(for var t from 1 to 2 collect var)
. Clisp produces (1 2)
, but
ccl, cmucl, ecl, and sbcl all complain that T
is not a subtype of
NUMBER
.
Likewise for (for var nil from 1 to 2 collect var)
, clisp
works, but the others produce an error. I'm not really sure what a
type of NIL
is supposed to do here since nothing can be of type
NIL
. I couldn't find anything in the CLHS about this.
I found this when running some tests from sacla. There are other failures that I see, but I have not investigated if they are bugs in the test or in the implementation.