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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user