0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.4231: Vim9: map() gives type error when type was not declared

Problem:    Vim9: map() gives type error when type was not declared.
Solution:   Only check the type when it was declared, like extend() does.
            (closes #9635)
This commit is contained in:
Bram Moolenaar
2022-01-27 16:36:29 +00:00
parent 94373c48e7
commit 35c807df1f
6 changed files with 35 additions and 20 deletions

View File

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