1.0.28.3: ABOUT-TO-MODIFY-SYMBOL-VALUE doesn't choke on FUNCTION subtypes
[sbcl.git] / src / code / early-extensions.lisp
index 1738fbd..0e1d52a 100644 (file)
       ;; :VARIABLE :TYPE is in the db only if it is declared, so no need to
       ;; check.
       (let ((type (info :variable :type symbol)))
-        (unless (sb!kernel::%%typep new-value type)
+        (unless (sb!kernel::%%typep new-value type nil)
           (let ((spec (type-specifier type)))
             (error 'simple-type-error
                    :format-control "Cannot ~@? to ~S (not of type ~S.)"
 ;;; guts of complex systems anyway, I replaced it too.)
 (defmacro aver (expr)
   `(unless ,expr
-     (%failed-aver ,(format nil "~A" expr))))
+     (%failed-aver ',expr)))
 
-(defun %failed-aver (expr-as-string)
+(defun %failed-aver (expr)
   ;; hackish way to tell we're in a cold sbcl and output the
-  ;; message before signallign error, as it may be this is too
+  ;; message before signalling error, as it may be this is too
   ;; early in the cold init.
   (when (find-package "SB!C")
     (fresh-line)
     (write-line "failed AVER:")
-    (write-line expr-as-string)
+    (write expr)
     (terpri))
-  (bug "~@<failed AVER: ~2I~_~S~:>" expr-as-string))
+  (bug "~@<failed AVER: ~2I~_~A~:>" expr))
 
 (defun bug (format-control &rest format-arguments)
   (error 'bug