0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.2365: Vim9: no check for map() changing item type at script level

Problem:    Vim9: no check for map() changing item type at script level.
Solution:   Check the new value type.
This commit is contained in:
Bram Moolenaar
2021-01-16 19:01:53 +01:00
parent f898f7c68d
commit 70250fb4d2
4 changed files with 80 additions and 29 deletions

View File

@@ -1351,7 +1351,7 @@ def Test_var_list_dict_type()
var ll: list<number>
ll = [1, 2, 3]->map('"one"')
END
CheckDefExecFailure(lines, 'E1012: Type mismatch; expected list<number> but got list<string>')
CheckDefExecFailure(lines, 'E1012: Type mismatch; expected number but got string')
enddef
def Test_cannot_use_let()