From ec86520f946a40d5c4a92d6a11d6928faa13abd4 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 25 Dec 2021 22:10:42 +0000 Subject: [PATCH] patch 8.2.3899: Vim9: test for map() on string fails Problem: Vim9: test for map() on string fails. Solution: Expect string return type. --- src/evalfunc.c | 5 +++-- src/version.c | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) 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, /**/ -- 2.40.0