1.0.37.68: Downgrade WARNING to STYLE-WARNING for *possible* type errors
[sbcl.git] / src / code / condition.lisp
index 14a50ce..ee00b04 100644 (file)
 ;;; The current code doesn't seem to quite match that.
 (def!method print-object ((x condition) stream)
   (if *print-escape*
-      (if (typep x 'simple-condition)
+      (if (and (typep x 'simple-condition) (slot-boundp x 'format-control))
           (print-unreadable-object (x stream :type t :identity t)
             (format stream "~S" (simple-condition-format-control x)))
           (print-unreadable-object (x stream :type t :identity t)))
 (define-condition type-warning (reference-condition simple-warning)
   ()
   (:default-initargs :references (list '(:sbcl :node "Handling of Types"))))
+(define-condition type-style-warning (reference-condition simple-style-warning)
+  ()
+  (:default-initargs :references (list '(:sbcl :node "Handling of Types"))))
 
 (define-condition local-argument-mismatch (reference-condition simple-warning)
   ()