Patch 8.2.1284
Problem:    Vim9: skipping over type includes following white space, leading
            to an error for missing white space.
Solution:   Do not skip over white space after the type.
Files:      src/vim9compile.c, src/testdir/test_vim9_func.vim


*** ../vim-8.2.1283/src/vim9compile.c   2020-07-23 19:06:18.870925899 +0200
--- src/vim9compile.c   2020-07-23 20:08:32.880258332 +0200
***************
*** 1944,1950 ****
                if (p[1] == ':')
                    p = skip_type(skipwhite(p + 2));
                else
!                   p = skipwhite(p + 1);
            }
        }
        else
--- 1944,1950 ----
                if (p[1] == ':')
                    p = skip_type(skipwhite(p + 2));
                else
!                   ++p;
            }
        }
        else
*** ../vim-8.2.1283/src/testdir/test_vim9_func.vim      2020-07-23 
18:26:25.259695152 +0200
--- src/testdir/test_vim9_func.vim      2020-07-23 20:07:58.720434673 +0200
***************
*** 283,288 ****
--- 283,298 ----
      assert_equal(123, Bar(Funcref))
    END
    CheckScriptSuccess(lines)
+ 
+   lines =<< trim END
+     vim9script
+     def UseNumber(nr: number)
+       echo nr
+     enddef
+     let Funcref: func(number) = function('UseNumber')
+     Funcref(123)
+   END
+   CheckScriptSuccess(lines)
  enddef
  
  let SomeFunc = function('len')
*** ../vim-8.2.1283/src/version.c       2020-07-23 19:06:18.874925878 +0200
--- src/version.c       2020-07-23 20:04:09.913616331 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     1284,
  /**/

-- 
Q: How many legs does a giraffe have?
A: Eight: two in front, two behind, two on the left and two on the right

 /// 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/202007231810.06NIAD90140309%40masaka.moolenaar.net.

Raspunde prin e-mail lui