mirror of
https://github.com/vim/vim.git
synced 2025-10-01 04:54:07 -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:
@@ -859,11 +859,11 @@ def Test_expr7_negate()
|
||||
assert_equal(88, --nr)
|
||||
enddef
|
||||
|
||||
def Echo(arg): string
|
||||
def Echo(arg: any): string
|
||||
return arg
|
||||
enddef
|
||||
|
||||
def s:EchoArg(arg): string
|
||||
def s:EchoArg(arg: any): string
|
||||
return arg
|
||||
enddef
|
||||
|
||||
@@ -991,6 +991,7 @@ def Test_expr7_trailing()
|
||||
assert_equal(123, d.key)
|
||||
enddef
|
||||
|
||||
|
||||
func Test_expr7_trailing_fails()
|
||||
call CheckDefFailureList(['let l = [2]', 'l->{l -> add(l, 8)}'], 'E107')
|
||||
call CheckDefFailureList(['let l = [2]', 'l->{l -> add(l, 8)} ()'], 'E274')
|
||||
|
Reference in New Issue
Block a user