X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fproclaim.lisp;h=3890102636987b8a920d3af00dacd74681f2a048;hb=3a2c2a2217f77e0d1a44a581c83e0311ebc2594a;hp=985816bb094ab98de362736fd315ce67e61e4c0b;hpb=c696666acb1e79504d3c49283288ba5c35180e71;p=sbcl.git diff --git a/src/compiler/proclaim.lisp b/src/compiler/proclaim.lisp index 985816b..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:~% ~