1
0
forked from aniani/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.
This commit is contained in:
Bram Moolenaar
2022-01-21 10:32:58 +00:00
parent dd5893be34
commit e6a4200ff4
4 changed files with 12 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()
@@ -23,4 +26,5 @@ func Test_autoload_vim9script()
call assert_equal(49, auto9#add42(7))
endfunc
" vim: shiftwidth=2 sts=2 expandtab