diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-01-16 16:07:01 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-01-16 16:07:01 +0100 |
commit | 351ead09dd365ebdee2bfa27ab22542d4920c779 (patch) | |
tree | 9db487e9482e7c44f4e2fd817c7f187b636ec9cf /src/testdir/test_vim9_builtin.vim | |
parent | 7c886db915035bc064ca307f02c34ae9d99cc733 (diff) |
patch 8.2.2362: Vim9: check of builtin function argument type is incompletev8.2.2362
Problem: Vim9: check of builtin function argument type is incomplete.
Solution: Use need_type() instead of check_arg_type().
Diffstat (limited to 'src/testdir/test_vim9_builtin.vim')
-rw-r--r-- | src/testdir/test_vim9_builtin.vim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim index f1c5de14e0..180070e0aa 100644 --- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -241,6 +241,9 @@ def Test_extend_arg_types() CheckDefFailure(['extend({a: 1}, 42)'], 'E1013: Argument 2: type mismatch, expected dict<number> but got number') CheckDefFailure(['extend({a: 1}, {b: "x"})'], 'E1013: Argument 2: type mismatch, expected dict<number> but got dict<string>') CheckDefFailure(['extend({a: 1}, {b: 2}, 1)'], 'E1013: Argument 3: type mismatch, expected string but got number') + + CheckDefFailure(['extend([1], ["b"])'], 'E1013: Argument 2: type mismatch, expected list<number> but got list<string>') + CheckDefExecFailure(['extend([1], ["b", 1])'], 'E1012: Type mismatch; expected list<number> but got list<any>') enddef def Test_extendnew() |