comparison 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
comparison
equal deleted inserted replaced
21177:3bc0c7d4e286 21178:fab2085e417f
907 res += n 907 res += n
908 endfor 908 endfor
909 assert_equal(6, res) 909 assert_equal(6, res)
910 enddef 910 enddef
911 911
912 def Test_extend_return_type()
913 let l = extend([1, 2], [3])
914 let res = 0
915 for n in l
916 res += n
917 endfor
918 assert_equal(6, res)
919 enddef
920
912 def Line_continuation_in_def(dir: string = ''): string 921 def Line_continuation_in_def(dir: string = ''): string
913 let path: string = empty(dir) 922 let path: string = empty(dir)
914 \ ? 'empty' 923 \ ? 'empty'
915 \ : 'full' 924 \ : 'full'
916 return path 925 return path