Mercurial > vim
diff src/testdir/test_vim9_assign.vim @ 27406:4c1bdee75bed v8.2.4231
patch 8.2.4231: Vim9: map() gives type error when type was not declared
Commit: https://github.com/vim/vim/commit/35c807df1f5774f09612d756ddc3cd5c44eacaca
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 27 16:36:29 2022 +0000
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 27 Jan 2022 17:45:03 +0100 |
parents | 6ed31017c303 |
children | 4c16acb2525f |
line wrap: on
line diff
--- a/src/testdir/test_vim9_assign.vim +++ b/src/testdir/test_vim9_assign.vim @@ -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()