]> granicus.if.org Git - vim/commitdiff
patch 8.2.1375: Vim9: method name with digit not accepted v8.2.1375
authorBram Moolenaar <Bram@vim.org>
Wed, 5 Aug 2020 13:43:44 +0000 (15:43 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 5 Aug 2020 13:43:44 +0000 (15:43 +0200)
Problem:    Vim9: method name with digit not accepted.
Solution:   Use eval_isnamec() instead of eval_isnamec1(). (closes #6613)

src/testdir/test_vim9_expr.vim
src/version.c
src/vim9compile.c

index 8be0dea36e78b84369d33761d5070575b6a195d1..aa705b2168f5b748b4d7151dd5dbdcbeabc36916 100644 (file)
@@ -1674,14 +1674,14 @@ def Echo(arg: any): string
   return arg
 enddef
 
-def s:EchoArg(arg: any): string
+def s:Echo4Arg(arg: any): string
   return arg
 enddef
 
 def Test_expr7_call()
   assert_equal('yes', 'yes'->Echo())
   assert_equal('yes', 'yes'
-                       ->s:EchoArg())
+                       ->s:Echo4Arg())
   assert_equal(1, !range(5)->empty())
   assert_equal([0, 1, 2], --3->range())
 
index abf2af0c723b37e5f29b0d98a9cd0d3085ca4582..8bc928206d283fcd26bda54f96efadacbf58c57c 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1375,
 /**/
     1374,
 /**/
index e87634b31bab524c4da286573ee69369a65d23f1..b3cca5842cd20af3bb0a2bda51ecf08f28054efc 100644 (file)
@@ -3854,7 +3854,7 @@ compile_subscript(
                }
                if (ASCII_ISALPHA(*p) && p[1] == ':')
                    p += 2;
-               for ( ; eval_isnamec1(*p); ++p)
+               for ( ; eval_isnamec(*p); ++p)
                    ;
                if (*p != '(')
                {