diff src/testdir/test_vim9_func.vim @ 21170:8c494353c6bc v8.2.1136

patch 8.2.1136: Vim9: return type of argv() is always any Commit: https://github.com/vim/vim/commit/846178a72ca0860073d47fc0dc95f98d15f1d921 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 5 17:04:13 2020 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Sun, 05 Jul 2020 17:15:03 +0200
parents 4a190861f0cc
children 96ae8622cfb6
line wrap: on
line diff
--- a/src/testdir/test_vim9_func.vim
+++ b/src/testdir/test_vim9_func.vim
@@ -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