# HG changeset patch # User Bram Moolenaar # Date 1640470504 -3600 # Node ID 59dde78e9436b60c280b93068b23090d8e9a7bd0 # Parent 9ed6ad5a8a73322a5edbf1d678071847761cb3d6 patch 8.2.3899: Vim9: test for map() on string fails Commit: https://github.com/vim/vim/commit/ec86520f946a40d5c4a92d6a11d6928faa13abd4 Author: Bram Moolenaar Date: Sat Dec 25 22:10:42 2021 +0000 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 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -517,8 +517,9 @@ arg_map_func(type_T *type, argcontext_T 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 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3899, +/**/ 3898, /**/ 3897,