<div dir="ltr">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?<br>
<br>(defclass test-class ()<br> ((a :initarg :a) (b :initarg :b)) )<br><br>(defun func1 (lst)<br> (declare (type list lst))<br> lst )<br><br>(defmethod print-object ((obj test-class) str)<br> (format str "#<This is an objects special PRINT-OBJECT form ~A ~A>"<br>
(slot-value obj 'a) (slot-value obj 'b) ))<br><br>;; This causes an error (func1 expects a list)<br>(func1 (make-array 20 :initial-contents<br> (loop for i below 20 collect<br> (make-instance 'test-class :a 1 :b 2) )))<br>
<br>In the debugger I get this (the error message here has lost the "is not of type LIST" part):<br><br>The value<br> #(#<This is an objects special PRINT-OBJECT form 1 2><br> #<This is an objects special PRINT-OBJECT form 1 2><br>
#<This is an objects special PRINT-OBJECT form 1 2><br> #<This is an objects special PRINT-OBJECT form 1 2><br> #<This is an objects special PRINT-OBJECT form 1 2><br> #<This is an objects special PRINT-OBJECT form 1 2><br>
#<This is an objects special PRINT-OBJECT form 1 2><br> #<This is an objects special PRINT-OBJECT form 1 2><br> #<This is an objects special PRINT-OBJECT form 1 2> ..)<br> [Condition of type TYPE-ERROR]<br>
<br>Restarts:<br> 0: [ABORT] Return to SLIME's top level.<br> 1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" {1425AA89}>)<br><br>Backtrace:<br> 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]<br>
1: (SB-INT:SIMPLE-EVAL-IN-LEXENV (FUNC1 (MAKE-ARRAY 20 :INITIAL-CONTENTS (LOOP FOR I BELOW 20 COLLECT ...))) #<NULL-LEXENV>)<br> 2: (SWANK::EVAL-REGION "(func1 (make-array 20 :initial-contents (loop for i below 20 collect (make-instance 'test-class :a 1 :b 2))))<br>
")<br><br></div>