]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.0829: filter() may give misleading error message v8.2.0829
authorBram Moolenaar <Bram@vim.org>
Tue, 26 May 2020 18:22:01 +0000 (20:22 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 26 May 2020 18:22:01 +0000 (20:22 +0200)
Problem:    filter() may give misleading error message.
Solution:   Also mention Blob as an allowed argument.

src/list.c
src/testdir/test_filter_map.vim
src/version.c

index b9e7e340d7275a6fb8708dfe32e13447fc9702e0..7c06cfce573e2880a56977fec8eb610194f65b2c 100644 (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;
     }
 
index 0f58685c60d12a33f04933330c0ee24ab857238e..8883ea3cc5d31c8543522ab99b77e4e79086aecc 100644 (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:')
index c2cb3ca690523fb9fd86e81b309fd4345d1194b1..f91ff1a99d74c8474e78c55b8a0eae7d44fd361e 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    829,
 /**/
     828,
 /**/