mirror of
https://github.com/vim/vim.git
synced 2025-10-04 05:25:06 -04:00
patch 8.2.1136: Vim9: return type of argv() is always any
Problem: Vim9: return type of argv() is always any. Solution: Use list<string> if there is no argument.
This commit is contained in:
@@ -610,6 +610,15 @@ def Test_repeat_return_type()
|
||||
assert_equal(6, res)
|
||||
enddef
|
||||
|
||||
def Test_argv_return_type()
|
||||
next fileone filetwo
|
||||
let res = ''
|
||||
for name in argv()
|
||||
res ..= name
|
||||
endfor
|
||||
assert_equal('fileonefiletwo', res)
|
||||
enddef
|
||||
|
||||
def Test_func_type_part()
|
||||
let RefVoid: func: void
|
||||
RefVoid = FuncNoArgNoRet
|
||||
|
Reference in New Issue
Block a user