Skip to content

Commit c5da1fb

Browse files
committed
patch 8.2.1375: Vim9: method name with digit not accepted
Problem: Vim9: method name with digit not accepted. Solution: Use eval_isnamec() instead of eval_isnamec1(). (closes #6613)
1 parent a71e263 commit c5da1fb

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/testdir/test_vim9_expr.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,14 +1674,14 @@ def Echo(arg: any): string
16741674
return arg
16751675
enddef
16761676

1677-
def s:EchoArg(arg: any): string
1677+
def s:Echo4Arg(arg: any): string
16781678
return arg
16791679
enddef
16801680

16811681
def Test_expr7_call()
16821682
assert_equal('yes', 'yes'->Echo())
16831683
assert_equal('yes', 'yes'
1684-
->s:EchoArg())
1684+
->s:Echo4Arg())
16851685
assert_equal(1, !range(5)->empty())
16861686
assert_equal([0, 1, 2], --3->range())
16871687

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ static char *(features[]) =
754754

755755
static int included_patches[] =
756756
{ /* Add new patch number below this line */
757+
/**/
758+
1375,
757759
/**/
758760
1374,
759761
/**/

src/vim9compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3854,7 +3854,7 @@ compile_subscript(
38543854
}
38553855
if (ASCII_ISALPHA(*p) && p[1] == ':')
38563856
p += 2;
3857-
for ( ; eval_isnamec1(*p); ++p)
3857+
for ( ; eval_isnamec(*p); ++p)
38583858
;
38593859
if (*p != '(')
38603860
{

0 commit comments

Comments
 (0)