1.0.14.10: friendly CHECK-TYPE error message for quoted type-specifiers
authorNikodemus Siivola <nikodemus@random-state.net>
Fri, 1 Feb 2008 11:15:34 +0000 (11:15 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Fri, 1 Feb 2008 11:15:34 +0000 (11:15 +0000)
 * (QUOTE ...) is never a valid type-specifier.

 * When printing the macro-form responsible for an error, increase
   *PRINT-LEVEL* from 1 to 3, for a slightly better compiler-log
   reading experience.

src/code/macros.lisp
src/compiler/ir1tran.lisp
version.lisp-expr

index ebddde6..838d699 100644 (file)
 is not of the specified type. If an error is signalled and the restart
 is used to return, this can only return if the STORE-VALUE restart is
 invoked. In that case it will store into PLACE and start over."
+  ;; Detect a common user-error.
+  (when (and (consp type) (eq 'quote (car type)))
+    (error 'simple-reference-error
+           :format-control "Quoted type specifier in ~S: ~S"
+           :format-arguments (list 'check-type type)
+           :references (list '(:ansi-cl :macro check-type))))
   ;; KLUDGE: We use a simpler form of expansion if PLACE is just a
   ;; variable to work around Python's blind spot in type derivation.
   ;; For more complex places getting the type derived should not
index 2b0e386..9642368 100644 (file)
              (let ((*print-pretty* nil)
                    ;; We rely on the printer to abbreviate FORM.
                    (*print-length* 3)
-                   (*print-level* 1))
+                   (*print-level* 3))
                (format
                 nil
                 #-sb-xc-host "(in macroexpansion of ~S)"
index 23b050c..7d89be4 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.14.9"
+"1.0.14.10"