summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_vim9_expr.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-02-03 21:47:34 +0000
committerBram Moolenaar <Bram@vim.org>2022-02-03 21:47:34 +0000
commit7676c158798a7c90f500cab2c12af0d47bad6026 (patch)
tree3bab5a8f010f30e857747dcb5e41f8db7957d9e5 /src/testdir/test_vim9_expr.vim
parent02a977ea5ee733412011a7f259a4efa0ffc95f1a (diff)
patch 8.2.4293: Vim9: when copying a list it gets type list<any>v8.2.4293
Problem: Vim9: when copying a list it gets type list<any> even when the original list did not have a type. Solution: Only set the type when the original list has a type. (closes #9692)
Diffstat (limited to 'src/testdir/test_vim9_expr.vim')
-rw-r--r--src/testdir/test_vim9_expr.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index c6466d39a0..a4e3e9e0f2 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -1495,6 +1495,9 @@ def Test_expr5_list_add()
# result of glob() is "any", runtime type check
var sl: list<string> = glob('*.txt', false, true) + ['']
+
+ var lln: list<list<number>> = [[1] + [2]]
+ assert_equal([[1, 2]], lln)
END
v9.CheckDefAndScriptSuccess(lines)
enddef