From 8e2dbedaf18c9f9104e0b346d50732ca5a8ef69b Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 13 Mar 2018 19:19:02 -0700 Subject: regression: excess args not diagnosed. This was caused by the recent work to reduce consing in generic_funcall. * lib.c (generic_funcall): Correct test for too many arguments. Because we don't normalize the argument list to the exact number of fixed args, but to at least the fixed args, the excess args can possibly be part of the fill rather than part of the list. --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.c b/lib.c index 014fd227..4906032e 100644 --- a/lib.c +++ b/lib.c @@ -6170,7 +6170,7 @@ val generic_funcall(val fun, struct args *args_in) if (args->fill < reqargs) callerror(fun, lit("missing required arguments")); - if (args->list) + if (args->fill > fixparam || args->list) callerror(fun, lit("too many arguments")); switch (fun->f.functype) { -- cgit v1.2.3