diff src/testdir/test_vim9_assign.vim @ 25126:b825efff9790 v8.2.3100

patch 8.2.3100: Vim9: no error when using type with unknown number of args Commit: https://github.com/vim/vim/commit/7a40ff00edd35cc4313d74a43e7a7b67cd24372d Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 4 15:54:08 2021 +0200 patch 8.2.3100: Vim9: no error when using type with unknown number of args Problem: Vim9: no error when using type with unknown number of arguments. Solution: Do not ignore argument count of -1. (closes https://github.com/vim/vim/issues/8492)
author Bram Moolenaar <Bram@vim.org>
date Sun, 04 Jul 2021 16:00:03 +0200
parents 64bef59f11ef
children 5731bcaaabcb
line wrap: on
line diff
--- a/src/testdir/test_vim9_assign.vim
+++ b/src/testdir/test_vim9_assign.vim
@@ -650,6 +650,15 @@ def Test_assignment_list()
     d.dd[0] = 0
   END
   CheckDefExecFailure(lines, 'E1147:', 2)
+
+  lines =<< trim END
+      def OneArg(x: bool)
+      enddef
+      def TwoArgs(x: bool, y: bool)
+      enddef
+      var fl: list<func(bool, bool, bool)> = [OneArg, TwoArgs]
+  END
+  CheckDefExecAndScriptFailure(lines, 'E1012:', 5)
 enddef
 
 def Test_assignment_list_any_index()