summaryrefslogtreecommitdiffstats
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-27 12:29:19 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-27 12:29:19 +0000
commitef8f04b1d1daf2e0be8fa38dedcae84ebfc5ffb4 (patch)
treeead387b1ef5b11f9c7a64da3d4fa53309bb5f0ea /src/evalfunc.c
parent23018f2d4b6f85512af117d346eee9b14a4637a6 (diff)
patch 8.2.3911: Vim9: type check for filter() does not accept unknownv8.2.3911
Problem: Vim9: type check for filter() does not accept unknown. Solution: Also accept unknown for the return type. (closes #9413)
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index d78589c6d5..f3105200fd 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -494,6 +494,7 @@ arg_filter_func(type_T *type, argcontext_T *context)
if (type->tt_type == VAR_FUNC
&& !(type->tt_member->tt_type == VAR_BOOL
|| type->tt_member->tt_type == VAR_NUMBER
+ || type->tt_member->tt_type == VAR_UNKNOWN
|| type->tt_member->tt_type == VAR_ANY))
{
arg_type_mismatch(&t_func_bool, type, context->arg_idx + 1);