Patch 8.2.2372 (after 8.2.2371)
Problem: Confusing error message for wrong :let command.
Solution: Only check for type in Vim9 script.
Files: src/evalvars.c
*** ../vim-8.2.2371/src/evalvars.c 2021-01-17 20:23:31.303042029 +0100
--- src/evalvars.c 2021-01-17 20:31:11.693880124 +0100
***************
*** 1061,1067 ****
char_u *
skip_var_one(char_u *arg, int include_type)
{
! char_u *end;
if (*arg == '@' && arg[1] != NUL)
return arg + 2;
--- 1061,1068 ----
char_u *
skip_var_one(char_u *arg, int include_type)
{
! char_u *end;
! int vim9 = in_vim9script();
if (*arg == '@' && arg[1] != NUL)
return arg + 2;
***************
*** 1070,1079 ****
// "a: type" is declaring variable "a" with a type, not "a:".
// Same for "s: type".
! if (end == arg + 2 && end[-1] == ':')
--end;
! if (include_type && in_vim9script())
{
if (*end == ':')
end = skip_type(skipwhite(end + 1), FALSE);
--- 1071,1080 ----
// "a: type" is declaring variable "a" with a type, not "a:".
// Same for "s: type".
! if (vim9 && end == arg + 2 && end[-1] == ':')
--end;
! if (include_type && vim9)
{
if (*end == ':')
end = skip_type(skipwhite(end + 1), FALSE);
*** ../vim-8.2.2371/src/version.c 2021-01-17 20:23:31.303042029 +0100
--- src/version.c 2021-01-17 20:51:54.302842158 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2372,
/**/
--
hundred-and-one symptoms of being an internet addict:
173. You keep tracking down the email addresses of all your friends
(even childhood friends).
/// 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/202101171952.10HJqkTG692822%40masaka.moolenaar.net.