This is a minor inconvenience since I can inspect the condition and find out what is really going on, but, just thought I would point it out. From cvs slime (a little out of date). Anyone else get this behavior?
(defclass test-class () ((a :initarg :a) (b :initarg :b)) )
(defun func1 (lst) (declare (type list lst)) lst )
(defmethod print-object ((obj test-class) str) (format str "#<This is an objects special PRINT-OBJECT form ~A ~A>" (slot-value obj 'a) (slot-value obj 'b) ))
;; This causes an error (func1 expects a list) (func1 (make-array 20 :initial-contents (loop for i below 20 collect (make-instance 'test-class :a 1 :b 2) )))
In the debugger I get this (the error message here has lost the "is not of type LIST" part):
The value #(#<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> ..) [Condition of type TYPE-ERROR]
Restarts: 0: [ABORT] Return to SLIME's top level. 1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" {1425AA89}>)
Backtrace: 0: (FUNC1 #(#<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> ...))[:EXTERNAL] 1: (SB-INT:SIMPLE-EVAL-IN-LEXENV (FUNC1 (MAKE-ARRAY 20 :INITIAL-CONTENTS (LOOP FOR I BELOW 20 COLLECT ...))) #<NULL-LEXENV>) 2: (SWANK::EVAL-REGION "(func1 (make-array 20 :initial-contents (loop for i below 20 collect (make-instance 'test-class :a 1 :b 2)))) ")