The value NIL is not of type NUMBER in compiling lambda with case form, dead code

Bug #2058274 reported by Paul F. Dietz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

(lambda (b)
  (declare (type (integer 605 829) b))
  (case b ((2) b) ((-3 3 -4) 0) (t 0)))

==>

The value
  NIL
is not of type
  NUMBER
   [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 tid=32557 "repl-thread" RUNNING {1001908003}>)

Backtrace:
  0: (SB-KERNEL:TWO-ARG-+ 49 NIL)
  1: ((LAMBDA (SB-ASSEM:SEGMENT SB-ASSEM::POSN) :IN "SYS:SRC;COMPILER;ASSEM.LISP") #<SB-ASSEM:SEGMENT {1006B7CDE3}> #<unused argument>)
  2: (SB-ASSEM::PROCESS-BACK-PATCHES #<SB-ASSEM:SEGMENT {1006B7CDE3}>)
  3: (SB-ASSEM:FINALIZE-SEGMENT #<SB-ASSEM:SEGMENT {1006B7CDE3}>)
  4: (SB-ASSEM:ASSEMBLE-SECTIONS #S(SB-ASSEM::ASMSTREAM :DATA-SECTION (#<SB-ASSEM::STMT IGNORE {1006B7BBB3}> . #<SB-ASSEM::STMT .ALIGN {1006B7CF23}>) :CODE-SECTION (#1=#<SB-ASSEM::STMT IGNORE {1006B7BBF3}>..
  5: (SB-C::GENERATE-CODE #<SB-C:COMPONENT :NAME "<unknown>" {1006B36AD3}>)
  6: (SB-C::%COMPILE-COMPONENT #<SB-C:COMPONENT :NAME "<unknown>" {1006B36AD3}>)
[...]

x86-64, "2.4.2.192-0548f3209"

Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.