diff --git a/code/defstruct.lisp b/code/defstruct.lisp index 4a68ec8ded6a735a41c26552218120069fa7d0c6..e4018cb1598e554e99ff91cc7bcd0d3ec2bb51d6 100644 --- a/code/defstruct.lisp +++ b/code/defstruct.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/defstruct.lisp,v 1.95 2004/10/05 21:57:27 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/defstruct.lisp,v 1.96 2005/10/21 17:56:07 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -465,6 +465,8 @@ (unlock-all () :report "Unlock all packages, then continue" (lisp::unlock-all-packages)))) + (when (info declaration recognized name) + (error "Defstruct already names a declaration: ~S." name)) (when (stringp (car slot-descriptions)) (setf (dd-doc defstruct) (pop slot-descriptions))) (dolist (slot slot-descriptions) diff --git a/code/error.lisp b/code/error.lisp index b864890ddd60eddd50a5842752608f1f6121fba7..61991ae05bc1007e5ac76ae637498d9c0b9fa785 100644 --- a/code/error.lisp +++ b/code/error.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/error.lisp,v 1.83 2005/10/19 13:44:00 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/error.lisp,v 1.84 2005/10/21 17:56:07 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -692,6 +692,8 @@ (condition-writer-function x nv slot))))))) (defun %define-condition (name slots documentation report default-initargs) + (when (info declaration recognized name) + (error "Condition already names a declaration: ~S." name)) (let ((class (kernel::find-class name))) (setf (slot-class-print-function class) #'%print-condition) (setf (condition-class-slots class) slots) diff --git a/code/macros.lisp b/code/macros.lisp index 797e121ad2930f8d07e42a67c320a643b0bb76ad..eb1579acc35333128f510cb7b6e3a728d4368bad 100644 --- a/code/macros.lisp +++ b/code/macros.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/macros.lisp,v 1.106 2005/10/21 13:13:33 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/macros.lisp,v 1.107 2005/10/21 17:56:07 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -235,6 +235,8 @@ ,@(when doc `(,doc))))))) ;;; (defun %deftype (name expander &optional doc) + (when (info declaration recognized name) + (error "Deftype already names a declaration: ~S." name)) (ecase (info type kind name) (:primitive (when *type-system-initialized* diff --git a/compiler/proclaim.lisp b/compiler/proclaim.lisp index a93cf99da23037a1004ac0ce87bad8d6cff8131e..6d8746d3a02ba36c683aaa614671c1156c3d517e 100644 --- a/compiler/proclaim.lisp +++ b/compiler/proclaim.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/proclaim.lisp,v 1.42 2004/09/11 19:18:02 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/proclaim.lisp,v 1.43 2005/10/21 17:56:07 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -452,6 +452,8 @@ (dolist (decl args) (unless (symbolp decl) (error "Declaration to be RECOGNIZED is not a symbol: ~S." decl)) + (when (info type kind decl) + (error "Declaration already names a type: ~S." decl)) (setf (info declaration recognized decl) t))) ((start-block end-block)) ; ignore. (t