Patch 8.2.1375
Problem: Vim9: method name with digit not accepted.
Solution: Use eval_isnamec() instead of eval_isnamec1(). (closes #6613)
Files: src/vim9compile.c, src/testdir/test_vim9_expr.vim
*** ../vim-8.2.1374/src/vim9compile.c 2020-08-05 15:11:00.380135762 +0200
--- src/vim9compile.c 2020-08-05 15:43:09.121421125 +0200
***************
*** 3854,3860 ****
}
if (ASCII_ISALPHA(*p) && p[1] == ':')
p += 2;
! for ( ; eval_isnamec1(*p); ++p)
;
if (*p != '(')
{
--- 3854,3860 ----
}
if (ASCII_ISALPHA(*p) && p[1] == ':')
p += 2;
! for ( ; eval_isnamec(*p); ++p)
;
if (*p != '(')
{
*** ../vim-8.2.1374/src/testdir/test_vim9_expr.vim 2020-08-05 12:44:37.369298977 +0200
--- src/testdir/test_vim9_expr.vim 2020-08-05 15:42:37.893507909 +0200
***************
*** 1674,1687 ****
return arg
enddef
! def s:EchoArg(arg: any): string
return arg
enddef
def Test_expr7_call()
assert_equal('yes', 'yes'->Echo())
assert_equal('yes', 'yes'
! ->s:EchoArg())
assert_equal(1, !range(5)->empty())
assert_equal([0, 1, 2], --3->range())
--- 1674,1687 ----
return arg
enddef
! def s:Echo4Arg(arg: any): string
return arg
enddef
def Test_expr7_call()
assert_equal('yes', 'yes'->Echo())
assert_equal('yes', 'yes'
! ->s:Echo4Arg())
assert_equal(1, !range(5)->empty())
assert_equal([0, 1, 2], --3->range())
*** ../vim-8.2.1374/src/version.c 2020-08-05 15:11:00.380135762 +0200
--- src/version.c 2020-08-05 15:42:07.809590831 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1375,
/**/
--
hundred-and-one symptoms of being an internet addict:
128. You can access the Net -- via your portable and cellular phone.
/// Bram Moolenaar -- Br...@Moolenaar.net --
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 ///