0
0
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:
Bram Moolenaar
2020-07-05 17:04:13 +02:00
parent 50788ef349
commit 846178a72c
3 changed files with 23 additions and 1 deletions

View File

@@ -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