0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.2.0829: filter() may give misleading error message

Problem:    filter() may give misleading error message.
Solution:   Also mention Blob as an allowed argument.
This commit is contained in:
Bram Moolenaar 2020-05-26 20:22:01 +02:00
parent 92c098d18e
commit fcb0b61d15
3 changed files with 5 additions and 3 deletions

View File

@ -1768,7 +1768,7 @@ filter_map(typval_T *argvars, typval_T *rettv, int map)
}
else
{
semsg(_(e_listdictarg), ermsg);
semsg(_(e_listdictblobarg), ermsg);
return;
}

View File

@ -92,8 +92,8 @@ endfunc
func Test_map_filter_fails()
call assert_fails('call map([1], "42 +")', 'E15:')
call assert_fails('call filter([1], "42 +")', 'E15:')
call assert_fails("let l = map('abc', '\"> \" . v:val')", 'E712:')
call assert_fails("let l = filter('abc', '\"> \" . v:val')", 'E712:')
call assert_fails("let l = map('abc', '\"> \" . v:val')", 'E896:')
call assert_fails("let l = filter('abc', '\"> \" . v:val')", 'E896:')
call assert_fails("let l = filter([1, 2, 3], '{}')", 'E728:')
call assert_fails("let l = filter({'k' : 10}, '{}')", 'E728:')
call assert_fails("let l = filter([1, 2], {})", 'E731:')

View File

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