Mercurial > vim
diff src/testdir/test_vim9_func.vim @ 21178:fab2085e417f v8.2.1140
patch 8.2.1140: Vim9: return type of extend() is any
Commit: https://github.com/vim/vim/commit/b3c019cbc32e2e9250ac668bf77d61ebd89c13f2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 5 20:08:39 2020 +0200
patch 8.2.1140: Vim9: return type of extend() is any
Problem: Vim9: return type of extend() is any.
Solution: Use type of the argument.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 05 Jul 2020 20:15:03 +0200 |
parents | 54c665ad2db3 |
children | dde4c2e84f5c |
line wrap: on
line diff
--- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -909,6 +909,15 @@ def Test_copy_return_type() assert_equal(6, res) enddef +def Test_extend_return_type() + let l = extend([1, 2], [3]) + let res = 0 + for n in l + res += n + endfor + assert_equal(6, res) +enddef + def Line_continuation_in_def(dir: string = ''): string let path: string = empty(dir) \ ? 'empty'