summaryrefslogtreecommitdiffstats
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-02-23 19:11:49 +0000
committerBram Moolenaar <Bram@vim.org>2022-02-23 19:11:49 +0000
commit6e1a38745f794715dc624399c318f513b54797c4 (patch)
tree335b5b60da1d7af6caeb2684cb3d8f4bd488ae08 /src/evalfunc.c
parent33fc4a63071c03ad46636b345a814e7e6d8f4ae0 (diff)
patch 8.2.4458: Vim9: compiling filter() call fails with unknown argumentsv8.2.4458
Problem: Vim9: compiling filter() call fails with 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 eb42269cfa..e8ed4bab04 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -552,6 +552,8 @@ check_map_filter_arg2(type_T *type, argcontext_T *context, int is_map)
t_func_exp.tt_member = &t_bool;
if (args[0] == NULL)
args[0] = &t_unknown;
+ if (type->tt_argcount == -1)
+ t_func_exp.tt_argcount = -1;
where.wt_index = 2;
return check_type(&t_func_exp, type, TRUE, where);