From 16cae44e5fa506c3ad82dd844c995fef7c5b72b1 Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Tue, 20 Nov 1990 17:40:47 +0000
Subject: [PATCH] Cleared up the explanation of keyword default types in 
 FIND-OPTIONAL-DISPATCH-TYPES, and removed an unnecessary conditional.

---
 compiler/ctype.lisp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/compiler/ctype.lisp b/compiler/ctype.lisp
index f91b2bdc5..4b198c2d6 100644
--- a/compiler/ctype.lisp
+++ b/compiler/ctype.lisp
@@ -607,10 +607,11 @@
 ;;;
 ;;;    With keywords, we exploit our knowledge about how hairy keyword
 ;;; defaulting is done when computing the type assertion to put on the
-;;; main-entry argument.  If the default is hairy (non-constant), then the
-;;; value of the main-entry arg in the unsupplied case is NIL, whatever the
-;;; actual default value is.  So we only have to union in NULL, and not totally
-;;; blow off doing any type assertion.
+;;; main-entry argument.  In the case of hairy keywords, the default has been
+;;; clobbered with NIL, which is the value of the main-entry arg in the
+;;; unsupplied case, whatever the actual default value is.  So we can just
+;;; assume the default is constant, effectively unioning in NULL, and not
+;;; totally blow off doing any type assertion.
 ;;;
 (defun find-optional-dispatch-types (od type where)
   (declare (type optional-dispatch od) (type function-type type)
@@ -660,8 +661,7 @@
 			(kinfo (find key keys :key #'key-info-name)))
 		   (cond
 		    (kinfo
-		     (res (type-union (key-info-type kinfo)
-				      (or def-type (specifier-type 'null)))))
+		     (res (type-union (key-info-type kinfo) def-type)))
 		    (t
 		     (note-lossage
 		      "Defining a ~S keyword not present in previous ~A."
-- 
GitLab