From b522e7678ee0730fcf56f137e8e7230b143a86d7 Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Sat, 12 May 1990 20:39:59 +0000
Subject: [PATCH] Added %NOTE-TYPE-DEFINED and made %COMPILER-DEFSTRUCT call
 it.

---
 compiler/proclaim.lisp | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/compiler/proclaim.lisp b/compiler/proclaim.lisp
index 564b5394f..58e3a0a68 100644
--- a/compiler/proclaim.lisp
+++ b/compiler/proclaim.lisp
@@ -200,7 +200,8 @@
     (setf (info type kind name) :structure)
     (setf (info type structure-info name) info)
     (when (info type expander name)
-      (setf (info type expander name) nil)))
+      (setf (info type expander name) nil))
+    (%note-type-defined name))
 
   ;;; ### Should declare arg/result types. 
   (let ((copier (dd-copier info)))
@@ -230,6 +231,20 @@
 
 (setf (symbol-function '%compiler-defstruct) #'%%compiler-defstruct)
 
+
+;;; %NOTE-TYPE-DEFINED  --  Interface
+;;;
+;;;    Note that the type Name has been (re)defined, updating the undefined
+;;; warnings and SPECIFIER-TYPE cache.
+;;; 
+(defun %note-type-defined (name)
+  (declare (symbol name))
+  (when (boundp '*undefined-warnings*)
+    (note-name-defined name :type))
+  (when (boundp '*specifier-type-cache-vector*)
+    (specifier-type-cache-clear))
+  (undefined-value))
+
 
 ;;;; Dummy definitions of COMPILER-ERROR, etc.
 ;;;
-- 
GitLab