From 12fc4123ba40fc19973b98eee43b31fcdb20f8c4 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Sat, 17 Apr 2010 15:57:04 +0000
Subject: [PATCH] pcl/defclass.lisp: o Signal an error if a defclass name names
 a declaration.

general-info/release-20b.txt:
o Update
---
 general-info/release-20b.txt | 2 ++
 pcl/defclass.lisp            | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/general-info/release-20b.txt b/general-info/release-20b.txt
index fafb4a4fd..af48f63e2 100644
--- a/general-info/release-20b.txt
+++ b/general-info/release-20b.txt
@@ -52,6 +52,8 @@ New in this release:
       now instead of the current table.
     - PRINC-TO-STRING binds *PRINT-READABLY* to NIL as required.
       Previously, it used the current value of *PRINT-READABLY*.
+    - DEFCLASS signals an error if the class name already names a
+      DECLARATION. 
 
   * Bugfixes:
     - On Unicode builds, printing of '|\|| and '|`| was incorrect
diff --git a/pcl/defclass.lisp b/pcl/defclass.lisp
index 7e1a8dc80..54f8fbc5e 100644
--- a/pcl/defclass.lisp
+++ b/pcl/defclass.lisp
@@ -25,7 +25,7 @@
 ;;; *************************************************************************
 
 (file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/defclass.lisp,v 1.31 2010/03/19 15:19:03 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/defclass.lisp,v 1.32 2010/04/17 15:57:04 rtoy Rel $")
 ;;;
 
 (in-package :pcl)
@@ -101,6 +101,9 @@
 	options (copy-tree options))
   ;;
   (when (eq *boot-state* 'complete)
+    (when (c::info declaration recognized name)
+      (error _"Defclass already names a declaration: ~S." name))
+  
     (dolist (super supers)
       (check-seals super 'expand-defclass)))
   ;;
-- 
GitLab