0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

patch 8.2.0570: Vim9: no error when omitting type from argument

Problem:    Vim9: no error when omitting type from argument.
Solution:   Enforce specifying argument types.
This commit is contained in:
Bram Moolenaar
2020-04-13 17:21:00 +02:00
parent fbda69b309
commit 6e949784be
7 changed files with 30 additions and 12 deletions

View File

@@ -917,7 +917,7 @@ def Test_for_loop_fails()
CheckDefFailure(['for # in range(5)'], 'E690:')
CheckDefFailure(['for i In range(5)'], 'E690:')
CheckDefFailure(['let x = 5', 'for x in range(5)'], 'E1023:')
CheckScriptFailure(['def Func(arg)', 'for arg in range(5)', 'enddef'], 'E1006:')
CheckScriptFailure(['def Func(arg: any)', 'for arg in range(5)', 'enddef'], 'E1006:')
CheckDefFailure(['for i in "text"'], 'E1024:')
CheckDefFailure(['for i in xxx'], 'E1001:')
CheckDefFailure(['endfor'], 'E588:')