Patch 8.2.1157
Problem:    Vim9: dict.name is not recognized as an expression.
Solution:   Recognize ".name". (closes #6418)
Files:      src/ex_docmd.c, src/testdir/test_vim9_cmd.vim


*** ../vim-8.2.1156/src/ex_docmd.c      2020-07-05 18:18:24.342937456 +0200
--- src/ex_docmd.c      2020-07-08 18:03:55.144921418 +0200
***************
*** 3229,3241 ****
        // "varname[]" is an expression.
        // "g:varname" is an expression.
        // "varname->expr" is an expression.
        // "(..." is an expression.
        // "{..." is an dict expression.
        if (*p == '('
                || *p == '{'
                || (*p == '[' && p > eap->cmd)
                || p[1] == ':'
!               || (*p == '-' && p[1] == '>'))
        {
            eap->cmdidx = CMD_eval;
            return eap->cmd;
--- 3229,3243 ----
        // "varname[]" is an expression.
        // "g:varname" is an expression.
        // "varname->expr" is an expression.
+       // "varname.expr" is an expression.
        // "(..." is an expression.
        // "{..." is an dict expression.
        if (*p == '('
                || *p == '{'
                || (*p == '[' && p > eap->cmd)
                || p[1] == ':'
!               || (*p == '-' && p[1] == '>')
!               || (*p == '.' && ASCII_ISALPHA(p[1])))
        {
            eap->cmdidx = CMD_eval;
            return eap->cmd;
*** ../vim-8.2.1156/src/testdir/test_vim9_cmd.vim       2020-07-06 
23:04:44.829229830 +0200
--- src/testdir/test_vim9_cmd.vim       2020-07-08 18:26:48.395369813 +0200
***************
*** 208,213 ****
--- 208,230 ----
    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'
*** ../vim-8.2.1156/src/version.c       2020-07-08 17:47:51.927988841 +0200
--- src/version.c       2020-07-08 18:29:19.002866687 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     1157,
  /**/

-- 
Engineers understand that their appearance only bothers other people and
therefore it is not worth optimizing.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202007081634.068GYG7P1387232%40masaka.moolenaar.net.

Raspunde prin e-mail lui