diff src/testdir/test_vim9_func.vim @ 21164:4a190861f0cc v8.2.1133

patch 8.2.1133: Vim9: return type of add() is not specific enough Commit: https://github.com/vim/vim/commit/fce82b3aa7dd87f9e15a4c12eda2c65de285d99a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 5 16:07:21 2020 +0200 patch 8.2.1133: Vim9: return type of add() is not specific enough Problem: Vim9: return type of add() is not specific enough. Solution: Return the type of the first argument. (closes https://github.com/vim/vim/issues/6395)
author Bram Moolenaar <Bram@vim.org>
date Sun, 05 Jul 2020 16:15:04 +0200
parents 3158cc2384cc
children 8c494353c6bc
line wrap: on
line diff
--- a/src/testdir/test_vim9_func.vim
+++ b/src/testdir/test_vim9_func.vim
@@ -602,6 +602,12 @@ def Test_repeat_return_type()
     res += n
   endfor
   assert_equal(3, res)
+
+  res = 0
+  for n in add([1, 2], 3)
+    res += n
+  endfor
+  assert_equal(6, res)
 enddef
 
 def Test_func_type_part()