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

patch 8.2.1758: Vim9: type of unmaterialized list is wrong

Problem:    Vim9: type of unmaterialized list is wrong.
Solution:   Use list<number>.
This commit is contained in:
Bram Moolenaar
2020-09-27 17:45:03 +02:00
parent a5fe91e6dc
commit 5597ba0467
3 changed files with 13 additions and 5 deletions

View File

@@ -1517,6 +1517,10 @@ def Test_expr7_list()
llstring = [[], ['text']]
llstring = [[], []]
var rangelist: list<number> = range(3)
g:rangelist = range(3)
CheckDefExecFailure(["var x: list<string> = g:rangelist"], 'E1012: Type mismatch; expected list<string> but got list<number>', 1)
CheckDefFailure(["let x = 1234[3]"], 'E1107:', 1)
CheckDefExecFailure(["let x = g:anint[3]"], 'E1062:', 1)