0
0
mirror of https://github.com/vim/vim.git synced 2025-10-05 05:34:07 -04:00

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 #6395)
This commit is contained in:
Bram Moolenaar
2020-07-05 16:07:21 +02:00
parent 9978d473e3
commit fce82b3aa7
3 changed files with 9 additions and 1 deletions

View File

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