0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.3104: Vim9: unspecified function type causes type error

Problem:    Vim9: unspecified function type causes type error.
Solution:   Don't check type when min_argcount is negative. (issue #8492)
This commit is contained in:
Bram Moolenaar
2021-07-04 18:28:15 +02:00
parent f33cae6050
commit b7480cd893
4 changed files with 13 additions and 1 deletions

View File

@@ -661,6 +661,15 @@ def Test_assignment_list()
CheckDefExecAndScriptFailure(lines, 'E1012:', 5)
enddef
def PartFunc(b: bool): string
return 'done'
enddef
def Test_assignment_partial()
var Partial: func(): string = function(PartFunc, [true])
assert_equal('done', Partial())
enddef
def Test_assignment_list_any_index()
var l: list<number> = [1, 2]
for [x, y, _]