1
0
forked from aniani/vim

patch 8.2.3154: Vim9: some type checks for builtin functions fail

Problem:    Vim9: some type checks for builtin functions fail.
Solution:   Correct the type checks. (Yegappan Lakshmanan, closes #8551,
            closes #8550)
This commit is contained in:
Yegappan Lakshmanan
2021-07-11 22:04:25 +02:00
committed by Bram Moolenaar
parent 7b7a118e74
commit 841e498c5d
3 changed files with 21 additions and 3 deletions

View File

@@ -431,9 +431,10 @@ arg_item_of_prev(type_T *type, argcontext_T *context)
static int
arg_str_or_nr_or_list(type_T *type, argcontext_T *context)
{
if (type->tt_type == VAR_STRING
|| type->tt_type == VAR_NUMBER
|| type->tt_type == VAR_LIST)
if (type->tt_type == VAR_ANY
|| type->tt_type == VAR_STRING
|| type->tt_type == VAR_NUMBER
|| type->tt_type == VAR_LIST)
return OK;
arg_type_mismatch(&t_string, type, context->arg_idx + 1);
return FAIL;