loop destructuring with type error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Medium
|
Unassigned |
Bug Description
A loop example from CLHS: http://
;; If all the types are the same, this way is even simpler.
(loop for (a b c) of-type float in
'((1.0 2.0 4.0) (5.0 6.0 8.3) (8.0 9.0 10.4))
collect (list c b a))
Expected to return: ((4.0 2.0 1.0) (8.3 6.0 5.0) (10.4 9.0 8.0))
But instead SBCL signals a SIMPLE-TYPE-ERROR:
Value of NIL in
(LET ((A 0.0)
(B 0.0)
(C 0.0)
'((1.0 2.0 4.0) (5.0 6.0 8.3) (8.0 9.0 10.4))))
(DECLARE (TYPE LIST #2#)
(TYPE FLOAT #1#)
(TYPE FLOAT C)
(TYPE FLOAT B)
(TYPE FLOAT A))
(SB-
(
is
NIL,
not a
FLOAT.
[Condition of type SIMPLE-TYPE-ERROR]
sbcl --version
SBCL 1.1.18
Linux hostname 3.12.13-gentoo #1 SMP PREEMPT Sun Mar 9 17:59:44 MDT 2014 x86_64 Intel(R) Core(TM)2 CPU T7600 @ 2.33GHz GenuineIntel GNU/Linux
tags: | added: loo |
tags: |
added: loop removed: loo |
Changed in sbcl: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
In a5ac94abb11975f 334d3eb18f6f339 b9e7dc5a5d.