vim-patch:8.2.4168: disallowing empty function name breaks existing plugins

Problem:    Disallowing empty function name breaks existing plugins.
Solution:   Allow empty function name in legacy script.

e6a4200ff4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2022-12-04 16:29:36 +08:00
parent 32810c0818
commit d93b906254
3 changed files with 11 additions and 2 deletions

View File

@@ -10,6 +10,9 @@ func Test_autoload_dict_func()
call assert_equal(1, g:called_foo_bar_echo)
eval 'bar'->g:foo#addFoo()->assert_equal('barfoo')
" empty name works in legacy script
call assert_equal('empty', foo#())
endfunc
func Test_source_autoload()
@@ -17,3 +20,6 @@ func Test_source_autoload()
source sautest/autoload/sourced.vim
call assert_equal(1, g:loaded_sourced_vim)
endfunc
" vim: shiftwidth=2 sts=2 expandtab