FIND and similar functions throw compile time errors on short improper lists
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
These forms might come up in macroexpansion and be dead, so no error should be thrown.
(compile nil '(lambda (c) (let ((x '(1 2 . 3))) (when (proper-list-p x (find c x))))))
==>
The value
3
is not of type
LIST
[Condition of type TYPE-ERROR]
Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [ABORT] abort thread (#<THREAD "new-repl-thread" RUNNING {102BF57813}>)
Backtrace:
0: (LENGTH (1 2 . 3))
1: ((SB-C:DEFTRANSFORM FIND) #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME FIND :TYPE #1=#<SB-
2: (SB-C::
3: (SB-C::IR1-OPTIMIZE #<SB-C:COMPONENT :NAME (LAMBDA (C)) {102C2D9F63}> NIL)
4: (SB-C::
5: (SB-C::
[...]
Similar failures occur with POSITION, POSITION-IF, and likely others.
Changed in sbcl: | |
status: | New → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
Correction: just position, not position-if.