forked from aniani/vim
patch 8.2.2572: Vim9: crash when getting the types for a legacy function
Problem: Vim9: crash when getting the types for a legacy function. Solution: Initialize the type list growarray. (closes #7929)
This commit is contained in:
@@ -739,6 +739,19 @@ def Test_lambda_uses_assigned_var()
|
||||
'x = filter(["bbb"], (_, v) => v =~ x)'])
|
||||
enddef
|
||||
|
||||
def Test_pass_legacy_lambda_to_def_func()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
func Foo()
|
||||
eval s:Bar({x -> 0})
|
||||
endfunc
|
||||
def Bar(y: any)
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Default arg and varargs
|
||||
def MyDefVarargs(one: string, two = 'foo', ...rest: list<string>): string
|
||||
var res = one .. ',' .. two
|
||||
|
||||
Reference in New Issue
Block a user