0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 8.2.3899: Vim9: test for map() on string fails

Problem:    Vim9: test for map() on string fails.
Solution:   Expect string return type.
This commit is contained in:
Bram Moolenaar
2021-12-25 22:10:42 +00:00
parent fb9dcb080b
commit ec86520f94
2 changed files with 5 additions and 2 deletions

View 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)
{

View File

@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3899,
/**/
3898,
/**/