From c5a7249b917ebdfd2de832c0044fc010b529ccfb Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Sat, 12 May 1990 21:07:58 +0000
Subject: [PATCH] When checking that the number of args match the number of arg
 types, watch out for :CONSTANT args.

---
 compiler/vmdef.lisp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/compiler/vmdef.lisp b/compiler/vmdef.lisp
index 7406d6257..77901f211 100644
--- a/compiler/vmdef.lisp
+++ b/compiler/vmdef.lisp
@@ -1532,7 +1532,11 @@
 	   (type (or operand-parse null) more-op) (string what))
   (unless (eq types :unspecified)
     (let ((num (+ (length ops) (if more-op 1 0))))
-      (unless (= (length types) num)
+      (unless (= (count-if-not #'(lambda (x)
+				   (and (consp x)
+					(eq (car x) :constant)))
+			       types)
+		 num)
 	(error "Expected ~D ~A type~P: ~S." num what types num)))
     (when more-op
       (let ((mtype (car (last types))))
-- 
GitLab