X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fproclaim.lisp;h=3890102636987b8a920d3af00dacd74681f2a048;hb=3a2c2a2217f77e0d1a44a581c83e0311ebc2594a;hp=a26b2a4423a5a20df09c44b39d4370861350c426;hpb=ff92598854bf7cae8d57fe49cef4d9a98e1ab345;p=sbcl.git diff --git a/src/compiler/proclaim.lisp b/src/compiler/proclaim.lisp index a26b2a4..3890102 100644 --- a/src/compiler/proclaim.lisp +++ b/src/compiler/proclaim.lisp @@ -135,10 +135,16 @@ ;;; implements that by converting (FOO X Y) to (TYPE FOO X Y). (defun canonized-decl-spec (decl-spec) (let ((id (first decl-spec))) - (unless (symbolp id) - (error "The declaration identifier is not a symbol: ~S" id)) - (let ((id-is-type (info :type :kind id)) + (let ((id-is-type (if (symbolp id) + (info :type :kind id) + ;; A cons might not be a valid type specifier, + ;; but it can't be a declaration either. + (or (consp id) + (typep id 'class)))) (id-is-declared-decl (info :declaration :recognized id))) + ;; FIXME: Checking ID-IS-DECLARED is probably useless these days, + ;; since we refuse to use the same symbol as both a type name and + ;; recognized declaration name. (cond ((and id-is-type id-is-declared-decl) (compiler-error "ambiguous declaration ~S:~% ~ @@ -169,7 +175,7 @@ (when (constantp name) (error "can't declare a constant as SPECIAL: ~S" name)) (with-single-package-locked-error - (:symbol name "globally declaraing ~A special")) + (:symbol name "globally declaring ~A special")) (clear-info :variable :constant-value name) (setf (info :variable :kind name) :special))) (type