changeset 20550:09143ab0fbbd v8.2.0829

patch 8.2.0829: filter() may give misleading error message Commit: https://github.com/vim/vim/commit/fcb0b61d15f66f0e9116a6bc56d9d8105bb913cf Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 26 20:22:01 2020 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Tue, 26 May 2020 20:30:06 +0200
parents bb6d8e1cb40e
children f1b23a9643fe
files src/list.c src/testdir/test_filter_map.vim src/version.c
diffstat 3 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/list.c
+++ b/src/list.c
@@ -1768,7 +1768,7 @@ filter_map(typval_T *argvars, typval_T *
     }
     else
     {
-	semsg(_(e_listdictarg), ermsg);
+	semsg(_(e_listdictblobarg), ermsg);
 	return;
     }
 
--- a/src/testdir/test_filter_map.vim
+++ b/src/testdir/test_filter_map.vim
@@ -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:')
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    829,
+/**/
     828,
 /**/
     827,