patch 8.2.4459: Vim9: compiling sort() call fails with unknown arguments
Problem: Vim9: compiling sort() call fails with a funcref that has unknown
arguments.
Solution: Do not check the arguments if they are unknown at compile time.
(closes #9835)
diff --git a/src/evalfunc.c b/src/evalfunc.c
index e8ed4ba..1b93200 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -624,6 +624,8 @@
where_T where = WHERE_INIT;
args[1] = args[0];
+ if (type->tt_argcount == -1)
+ t_func_exp.tt_argcount = -1;
where.wt_index = 2;
return check_type(&t_func_exp, type, TRUE, where);
}