Patch 8.2.0682
Problem: Vim9: parsing function argument type can get stuck.
Solution: Bail out when not making progress.
Files: src/vim9compile.c, src/testdir/test_vim9_func.vim
*** ../vim-8.2.0681/src/vim9compile.c 2020-05-02 17:52:38.404147677 +0200
--- src/vim9compile.c 2020-05-02 19:03:19.373703462 +0200
***************
*** 1663,1669 ****
--- 1663,1673 ----
++p;
while (*p != ')' && *p != NUL)
{
+ char_u *sp = p;
+
p = skip_type(p);
+ if (p == sp)
+ return p; // syntax error
if (*p == ',')
p = skipwhite(p + 1);
}
*** ../vim-8.2.0681/src/testdir/test_vim9_func.vim 2020-05-02
17:52:38.404147677 +0200
--- src/testdir/test_vim9_func.vim 2020-05-02 19:02:21.801880740 +0200
***************
*** 113,118 ****
--- 113,119 ----
call CheckDefFailure(['TakesOneArg()'], 'E119:')
call CheckDefFailure(['TakesOneArg(11, 22)'], 'E118:')
call CheckDefFailure(['bufnr(xxx)'], 'E1001:')
+ call CheckScriptFailure(['def Func(Ref: func(s: string))'], 'E475:')
enddef
" Default arg and varargs
*** ../vim-8.2.0681/src/version.c 2020-05-02 18:33:20.675870825 +0200
--- src/version.c 2020-05-02 19:04:32.961473318 +0200
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 682,
/**/
--
Bumper sticker: Honk if you love peace and quiet.
/// 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/202005021705.042H5f6N024103%40masaka.moolenaar.net.