Patch 8.2.1425
Problem:    Vim9: cannot use call() without :call.
Solution:   Do not skip over "call(". (closes #6689)
Files:      src/vim9compile.c, src/testdir/test_vim9_func.vim


*** ../vim-8.2.1424/src/vim9compile.c   2020-08-11 20:51:03.665789670 +0200
--- src/vim9compile.c   2020-08-12 14:14:57.116825709 +0200
***************
*** 6484,6491 ****
        cmdmod = save_cmdmod;
  
        // Skip ":call" to get to the function name.
        if (checkforcmd(&ea.cmd, "call", 3))
!           ea.cmd = skipwhite(ea.cmd);
  
        if (!starts_with_colon)
        {
--- 6484,6498 ----
        cmdmod = save_cmdmod;
  
        // Skip ":call" to get to the function name.
+       p = ea.cmd;
        if (checkforcmd(&ea.cmd, "call", 3))
!       {
!           if (*ea.cmd == '(')
!               // not for "call()"
!               ea.cmd = p;
!           else
!               ea.cmd = skipwhite(ea.cmd);
!       }
  
        if (!starts_with_colon)
        {
*** ../vim-8.2.1424/src/testdir/test_vim9_func.vim      2020-08-11 
22:30:39.223770448 +0200
--- src/testdir/test_vim9_func.vim      2020-08-12 14:20:15.139768710 +0200
***************
*** 290,295 ****
--- 290,301 ----
    CheckScriptFailure(lines, 'E1013:')
  enddef
  
+ def Test_call_call()
+   let l = [3, 2, 1]
+   call('reverse', [l])
+   assert_equal([1, 2, 3], l)
+ enddef
+ 
  let s:value = ''
  
  def FuncOneDefArg(opt = 'text')
*** ../vim-8.2.1424/src/version.c       2020-08-11 23:08:44.820637932 +0200
--- src/version.c       2020-08-12 14:20:44.075668024 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     1425,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
176. You lie, even to user-friends, about how long you were online yesterday.

 /// 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/202008121222.07CCMKNf041348%40masaka.moolenaar.net.

Raspunde prin e-mail lui