summaryrefslogtreecommitdiffstats
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-25 22:10:42 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-25 22:10:42 +0000
commitec86520f946a40d5c4a92d6a11d6928faa13abd4 (patch)
tree4793422c4588bf2fd013c8e62049b2d66c83a974 /src/evalfunc.c
parentfb9dcb080b5143d3021a8c1d6deaf143f2ca3a48 (diff)
patch 8.2.3899: Vim9: test for map() on string failsv8.2.3899
Problem: Vim9: test for map() on string fails. Solution: Expect string return type.
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 03d64599b6..8057408d7e 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -517,8 +517,9 @@ arg_map_func(type_T *type, argcontext_T *context)
if (context->arg_types[0]->tt_type == VAR_LIST
|| context->arg_types[0]->tt_type == VAR_DICT)
expected = context->arg_types[0]->tt_member;
- else if (context->arg_types[0]->tt_type == VAR_STRING
- || context->arg_types[0]->tt_type == VAR_BLOB)
+ else if (context->arg_types[0]->tt_type == VAR_STRING)
+ expected = &t_string;
+ else if (context->arg_types[0]->tt_type == VAR_BLOB)
expected = &t_number;
if (expected != NULL)
{