From 803efef8c25de8ebde3f035a26c7d5369db7c6a2 Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Sat, 21 Apr 1990 11:04:45 +0000
Subject: [PATCH] In %COMPILER-DEFSTRUCT, added an explicit check for an
 included type being undefined.  Removed a duplicate version of the code that
 added onto the DD-INCLUDED-BY.

---
 compiler/proclaim.lisp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/compiler/proclaim.lisp b/compiler/proclaim.lisp
index 9569660b1..564b5394f 100644
--- a/compiler/proclaim.lisp
+++ b/compiler/proclaim.lisp
@@ -187,7 +187,11 @@
 
   (let ((name (dd-name info)))
     (dolist (inc (dd-includes info))
-      (pushnew name (dd-included-by (info type structure-info inc))))
+      (let ((info (info type structure-info inc)))
+	(unless info
+	  (error "Structure type ~S is included by ~S but not defined."
+		 inc name))
+	(pushnew name (dd-included-by info))))
 
     (let ((old (info type structure-info name)))
       (when old
@@ -198,10 +202,6 @@
     (when (info type expander name)
       (setf (info type expander name) nil)))
 
-  (dolist (inc (dd-includes info))
-    (pushnew (dd-name info)
-	     (dd-included-by (info type structure-info inc))))
-
   ;;; ### Should declare arg/result types. 
   (let ((copier (dd-copier info)))
     (when copier
-- 
GitLab