1
0
forked from aniani/vim

patch 8.2.3911: Vim9: type check for filter() does not accept unknown

Problem:    Vim9: type check for filter() does not accept unknown.
Solution:   Also accept unknown for the return type. (closes #9413)
This commit is contained in:
Bram Moolenaar
2021-12-27 12:29:19 +00:00
parent 23018f2d4b
commit ef8f04b1d1
3 changed files with 9 additions and 0 deletions

View File

@@ -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);