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:
committed by
Bram Moolenaar
parent
7b7a118e74
commit
841e498c5d
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user