1
0
forked from aniani/vim

patch 8.2.1157: Vim9: dict.name is not recognized as an expression

Problem:    Vim9: dict.name is not recognized as an expression.
Solution:   Recognize ".name". (closes #6418)
This commit is contained in:
Bram Moolenaar
2020-07-08 18:30:06 +02:00
parent 002262f4de
commit 0a47e0970a
3 changed files with 22 additions and 1 deletions

View File

@@ -208,6 +208,23 @@ def Test_method_call_linebreak()
CheckScriptSuccess(lines)
enddef
def Test_dict_member()
let test: dict<list<number>> = {'data': [3, 1, 2]}
test.data->sort()
assert_equal(#{data: [1, 2, 3]}, test)
test.data
->reverse()
assert_equal(#{data: [3, 2, 1]}, test)
let lines =<< trim END
vim9script
let test: dict<list<number>> = {'data': [3, 1, 2]}
test.data->sort()
assert_equal(#{data: [1, 2, 3]}, test)
END
CheckScriptSuccess(lines)
enddef
def Test_bar_after_command()
def RedrawAndEcho()
let x = 'did redraw'