Mercurial > vim
diff src/evalfunc.c @ 27865:05d222e5246a v8.2.4458
patch 8.2.4458: Vim9: compiling filter() call fails with unknown arguments
Commit: https://github.com/vim/vim/commit/6e1a38745f794715dc624399c318f513b54797c4
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Feb 23 19:11:49 2022 +0000
patch 8.2.4458: Vim9: compiling filter() call fails with unknown arguments
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 23 Feb 2022 20:15:03 +0100 |
parents | f1799ba16729 |
children | 1b75d767d9e4 |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -552,6 +552,8 @@ check_map_filter_arg2(type_T *type, argc 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);