]> granicus.if.org Git - vim/commitdiff
patch 8.2.3899: Vim9: test for map() on string fails v8.2.3899
authorBram Moolenaar <Bram@vim.org>
Sat, 25 Dec 2021 22:10:42 +0000 (22:10 +0000)
committerBram Moolenaar <Bram@vim.org>
Sat, 25 Dec 2021 22:10:42 +0000 (22:10 +0000)
Problem:    Vim9: test for map() on string fails.
Solution:   Expect string return type.

src/evalfunc.c
src/version.c

index 03d64599b63cd2cc5dbad1a6f97729c8325dbca6..8057408d7e00efbc1d29c95762c5c2d941f4f444 100644 (file)
@@ -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)
        {
index e41dcb1457700e8075333b2f36ae125f8d119340..260182bdf74b0ae19f68cceaf94595e7a46f4e49 100644 (file)
@@ -749,6 +749,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3899,
 /**/
     3898,
 /**/