Patch 9.0.0630
Problem:    In Vim9 script a numbered function cannot be called.
Solution:   Do not require "g:" before a numbered function name.
            (closes #11254)
Files:      src/userfunc.c, src/testdir/test_vim9_func.vim


*** ../vim-9.0.0629/src/userfunc.c      2022-09-24 11:30:38.373605018 +0100
--- src/userfunc.c      2022-09-30 19:08:40.495534878 +0100
***************
*** 2095,2101 ****
  {
      return ufunc->uf_name[0] != K_SPECIAL
            && (ufunc->uf_flags & FC_LAMBDA) == 0
!           && vim_strchr(ufunc->uf_name, AUTOLOAD_CHAR) == NULL;
  }
  
  /*
--- 2095,2102 ----
  {
      return ufunc->uf_name[0] != K_SPECIAL
            && (ufunc->uf_flags & FC_LAMBDA) == 0
!           && vim_strchr(ufunc->uf_name, AUTOLOAD_CHAR) == NULL
!           && !isdigit(ufunc->uf_name[0]);
  }
  
  /*
*** ../vim-9.0.0629/src/testdir/test_vim9_func.vim      2022-09-23 
16:11:33.205103369 +0100
--- src/testdir/test_vim9_func.vim      2022-09-30 19:08:13.735360627 +0100
***************
*** 4210,4215 ****
--- 4210,4234 ----
    unlet g:mydict
  enddef
  
+ def Test_numbered_function_call()
+   var lines =<< trim END
+       let s:legacyscript = {}
+       func s:legacyscript.Helper() abort
+         return "Success"
+       endfunc
+       let g:legacyscript = deepcopy(s:legacyscript)
+ 
+       let g:legacy_result = eval("g:legacyscript.Helper()")
+       vim9cmd g:vim9_result = eval("g:legacyscript.Helper()")
+   END
+   v9.CheckScriptSuccess(lines)
+   assert_equal('Success', g:legacy_result)
+   assert_equal('Success', g:vim9_result)
+ 
+   unlet g:legacy_result
+   unlet g:vim9_result
+ enddef
+ 
  def Test_go_beyond_end_of_cmd()
    # this was reading the byte after the end of the line
    var lines =<< trim END
*** ../vim-9.0.0629/src/version.c       2022-09-30 17:57:32.543287031 +0100
--- src/version.c       2022-09-30 19:09:08.827708936 +0100
***************
*** 701,702 ****
--- 701,704 ----
  {   /* Add new patch number below this line */
+ /**/
+     630,
  /**/

-- 
The term "free software" is defined by Richard M. Stallman as
being software that isn't necessarily for free.  Confusing?
Let's call it "Stallman software" then!
                                -- Bram Moolenaar

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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/20220930181950.65E7C1C0A0D%40moolenaar.net.

Raspunde prin e-mail lui