0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -04:00

patch 8.2.0760: Vim9: dict member errors not tested

Problem:    Vim9: dict member errors not tested.
Solution:   Delete unreachable error.  Add tests.
This commit is contained in:
Bram Moolenaar
2020-05-15 21:44:19 +02:00
parent 270d0388d2
commit 4dac32caf3
3 changed files with 9 additions and 10 deletions

View File

@@ -799,8 +799,12 @@ enddef
def Test_expr_member()
assert_equal(1, g:dict_one.one)
let d: dict<number> = g:dict_one
assert_equal(1, d['one'])
call CheckDefFailure(["let x = g:dict_one.#$!"], 'E1002:')
call CheckDefExecFailure(["let d: dict<any>", "echo d['a']"], 'E716:')
call CheckDefExecFailure(["let d: dict<number>", "d = g:list_empty"], 'E1029: Expected dict but got list')
enddef
def Test_expr7_option()