summaryrefslogtreecommitdiffstats
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2021-07-11 22:04:25 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-11 22:04:25 +0200
commit841e498c5d1765eab17bce5242543b47dfc25b41 (patch)
treebbf8cc14a7bac23c241f79660d07b18251d8ab81 /src/evalfunc.c
parent7b7a118e74d25ff35cd277c2bb5191ae44bb20b2 (diff)
patch 8.2.3154: Vim9: some type checks for builtin functions failv8.2.3154
Problem: Vim9: some type checks for builtin functions fail. Solution: Correct the type checks. (Yegappan Lakshmanan, closes #8551, closes #8550)
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 4aa3b6d2af..060b5bbb28 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -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;