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)
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
index 14af261..801404d 100644
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -208,6 +208,23 @@
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'