diff src/testdir/test_vim9_builtin.vim @ 24414:f539864ba851 v8.2.2747

patch 8.2.2747: Vim9: not always an error for too many function arguments Commit: https://github.com/vim/vim/commit/bb8a7ce0a1bcfafca715275dbadc2ead612f82dd Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 10 20:10:26 2021 +0200 patch 8.2.2747: Vim9: not always an error for too many function arguments Problem: Vim9: not always an error for too many function arguments. Solution: Check for getting too many arguments.
author Bram Moolenaar <Bram@vim.org>
date Sat, 10 Apr 2021 20:15:04 +0200
parents 21c72f782ae1
children 3d5a66e478f8
line wrap: on
line diff
--- a/src/testdir/test_vim9_builtin.vim
+++ b/src/testdir/test_vim9_builtin.vim
@@ -506,7 +506,7 @@ def Test_filter_wrong_dict_key_type()
 enddef
 
 def Test_filter_return_type()
-  var l = filter([1, 2, 3], () => 1)
+  var l = filter([1, 2, 3], (_, _) => 1)
   var res = 0
   for n in l
     res += n
@@ -516,7 +516,7 @@ enddef
 
 def Test_filter_missing_argument()
   var dict = {aa: [1], ab: [2], ac: [3], de: [4]}
-  var res = dict->filter((k) => k =~ 'a' && k !~ 'b')
+  var res = dict->filter((k, _) => k =~ 'a' && k !~ 'b')
   res->assert_equal({aa: [1], ac: [3]})
 enddef