mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
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 #8492)
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user