POSITION miscompiles on a constant sequence containing OTHERWISE
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
(funcall (lambda (x) (position x '(a otherwise b))) 'a)
==>
Execution of a form compiled with errors.
Form:
(CASE SB-C::ITEM (A 0) (OTHERWISE 1) (B 2))
Compile-time error:
during macroexpansion of (CASE SB-C::ITEM (A 0) ...). Use *BREAK-ON-SIGNALS* to
intercept.
Bad CASE clause:
(OTHERWISE 1)
OTHERWISE allowed as the key designator only in the final otherwise-clause,
not in a normal-clause. Use (OTHERWISE) instead, or move the clause to the
correct position.
See also:
The ANSI Standard, Macro CASE
[Condition of type SB-INT:
Restarts:
0: [ABORT] Exit debugger, returning to top level.
Backtrace:
0: ((LAMBDA (X)) #<unused argument>)
1: (SB-INT:
2: (EVAL (FUNCALL (LAMBDA (X) (POSITION X #)) (QUOTE A)))
[...]
Changed in sbcl: | |
status: | New → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |