projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.9.2.31:
[sbcl.git]
/
src
/
compiler
/
proclaim.lisp
diff --git
a/src/compiler/proclaim.lisp
b/src/compiler/proclaim.lisp
index
a26b2a4
..
3890102
100644
(file)
--- 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)))
;;; 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)))
(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:~% ~
(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
(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
(clear-info :variable :constant-value name)
(setf (info :variable :kind name) :special)))
(type