From: Bram Moolenaar Date: Sat, 25 Dec 2021 22:10:42 +0000 (+0000) Subject: patch 8.2.3899: Vim9: test for map() on string fails X-Git-Tag: v8.2.3899 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec86520f946a40d5c4a92d6a11d6928faa13abd4;p=vim patch 8.2.3899: Vim9: test for map() on string fails Problem: Vim9: test for map() on string fails. Solution: Expect string return type. --- diff --git a/src/evalfunc.c b/src/evalfunc.c index 03d64599b..8057408d7 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) { diff --git a/src/version.c b/src/version.c index e41dcb145..260182bdf 100644 --- a/src/version.c +++ b/src/version.c @@ -749,6 +749,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 3899, /**/ 3898, /**/