patch 8.2.4293: Vim9: when copying a list it gets type list<any>
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)
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index c6466d3..a4e3e9e 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -1495,6 +1495,9 @@
# 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