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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user