diff --git a/compiler/ctype.lisp b/compiler/ctype.lisp index c91052293497a721d2db1c8d30cda46ecc10fe89..ca57fe5f6fa51f886ec28cc1fe8fff0e70bba149 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