From ffdb85b41ba844d2f7baf477fdcfa04f3cd3c8c7 Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Sat, 20 Oct 1990 05:39:02 +0000
Subject: [PATCH] Fixed FIND-LAMBDA-TYPES to notice when the arg count changes.

---
 compiler/ctype.lisp | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/compiler/ctype.lisp b/compiler/ctype.lisp
index c91052293..ca57fe5f6 100644
--- a/compiler/ctype.lisp
+++ b/compiler/ctype.lisp
@@ -689,9 +689,16 @@
 	      what where))))
     (frob (function-type-optional type) "optional args")
     (frob (function-type-keyp type) "keyword args")
-    (frob (function-type-rest type) "rest arg")
-    (try-type-intersections (lambda-vars lambda) (function-type-required type)
-			    where)))
+    (frob (function-type-rest type) "rest arg"))
+  (let* ((vars (lambda-vars lambda))
+	 (nvars (length vars))
+	 (req (function-type-required type))
+	 (nreq (length req)))
+    (unless (= nvars nreq)
+      (note-lossage
+       "Definition has ~R arg~:P, but the previous ~A had ~R."
+       nvars where nreq)
+      (try-type-intersections vars req where))))
 
 
 ;;; ASSERT-DEFINITION-TYPE  --  Interface
-- 
GitLab