summaryrefslogtreecommitdiffstats
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-02-23 21:03:32 +0000
committerBram Moolenaar <Bram@vim.org>2022-02-23 21:03:32 +0000
commitfa02616718103be3f9e13e26d57905d4eddf836d (patch)
tree5c1703f53990c916b5a9af0b2880088068fe7cff /src/evalfunc.c
parent6e1a38745f794715dc624399c318f513b54797c4 (diff)
patch 8.2.4459: Vim9: compiling sort() call fails with unknown argumentsv8.2.4459
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)
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index e8ed4bab04..1b93200367 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -624,6 +624,8 @@ arg_sort_how(type_T *type, type_T *decl_type UNUSED, argcontext_T *context)
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);
}