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

patch 8.2.1175: Vim9: cannot split a line before ".member"

Problem:    Vim9: Cannot split a line before ".member".
Solution:   Check for ".member" after line break.
This commit is contained in:
Bram Moolenaar
2020-07-10 21:50:41 +02:00
parent 11a5b19a8c
commit a7eedf317a
3 changed files with 32 additions and 4 deletions

View File

@@ -1016,7 +1016,8 @@ def Test_expr7_list()
call CheckDefFailure(["let x = g:list_mixed[xxx]"], 'E1001:')
call CheckDefFailure(["let x = [1,2,3]"], 'E1069:')
call CheckDefExecFailure(["let x = g:list_mixed['xx']"], 'E39:')
call CheckDefFailure(["let x = g:list_mixed[0"], 'E111:')
call CheckDefFailure(["let x = g:list_mixed["], 'E1097:')
call CheckDefFailure(["let x = g:list_mixed[0"], 'E1097:')
call CheckDefExecFailure(["let x = g:list_empty[3]"], 'E684:')
enddef
@@ -1135,6 +1136,11 @@ def Test_expr_member()
assert_equal(1, g:dict_one.one)
let d: dict<number> = g:dict_one
assert_equal(1, d['one'])
assert_equal(1, d[
'one'
])
assert_equal(1, d
.one)
# getting the one member should clear the dict after getting the item
assert_equal('one', #{one: 'one'}.one)