problem with backtraces with DX rest and type-errors from THE
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Triaged
|
Low
|
Unassigned |
Bug Description
(defun oops (x &rest args)
(declare (dynamic-extent args))
(the number x)
(length args))
(oops nil 1)
=>
debugger invoked on a TYPE-ERROR: The value NIL is not of type NUMBER.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
debugger invoked on a TYPE-ERROR:
The value #<invalid object #x11FF4C7> is not of type SEQUENCE.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
(REVERSE #<invalid object #x11FF4C7>
0[2]
The error occurs trying to reverse the rest-list -- which isn't what the debugger expect it to be.
Changing the THE to (DECLARE (NUMBER X)) makes things come out right.