forked from aniani/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.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user