Declare types for sb-kernel:coerce-to-condition.
authorStas Boukarev <stassats@gmail.com>
Mon, 16 Jul 2012 20:34:43 +0000 (00:34 +0400)
committerStas Boukarev <stassats@gmail.com>
Mon, 16 Jul 2012 20:34:43 +0000 (00:34 +0400)
Add
(defknown coerce-to-condition ((or condition symbol string function)
                               list type-specifier symbol)
    condition
    (explicit-check))
Which helps to remove optimization notes in some cases with
restart-case.

Fixes lp#1025416.

src/code/error.lisp
src/compiler/fndb.lisp

index e701982..9086a94 100644 (file)
         (t
          (error 'simple-type-error
                 :datum datum
-                :expected-type '(or symbol string)
+                :expected-type '(or symbol string function)
                 :format-control "Condition designator ~s is not of type ~s."
                 :format-arguments (list datum
-                                        '(or symbol string))))))
+                                        '(or symbol string function))))))
 
 (define-condition layout-invalid (type-error)
   ()
index 8fede70..ac471cf 100644 (file)
   ())
 (defknown style-warn (t &rest t) null ())
 
+(defknown coerce-to-condition ((or condition symbol string function)
+                               list type-specifier symbol)
+    condition
+    (explicit-check))
+
 (defknown sc-number-or-lose (symbol) sc-number
   (foldable))