0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.2.4264: Vim9: can use old style autoload function name

Problem:    Vim9: can use old style autoload function name.
Solution:   Give an error for old style autoload function name.
This commit is contained in:
Bram Moolenaar
2022-01-30 18:40:44 +00:00
parent ec3637cbaf
commit d8fe6d34bb
6 changed files with 42 additions and 32 deletions

View File

@@ -3078,7 +3078,7 @@ def Test_error_in_autoload_script()
var lines =<< trim END
vim9script noclear
def script#autoloaded()
export def Autoloaded()
enddef
def Broken()
var x: any = ''
@@ -3091,7 +3091,7 @@ def Test_error_in_autoload_script()
lines =<< trim END
vim9script
def CallAutoloaded()
script#autoloaded()
script#Autoloaded()
enddef
function Legacy()
@@ -3196,7 +3196,7 @@ func Test_no_redraw_when_restoring_cpo()
let lines =<< trim END
vim9script
def script#func()
export def Func()
enddef
END
call mkdir('Xdir/autoload', 'p')
@@ -3206,7 +3206,7 @@ func Test_no_redraw_when_restoring_cpo()
vim9script
set cpo+=M
exe 'set rtp^=' .. getcwd() .. '/Xdir'
au CmdlineEnter : ++once timer_start(0, (_) => script#func())
au CmdlineEnter : ++once timer_start(0, (_) => script#Func())
setline(1, 'some text')
END
call writefile(lines, 'XTest_redraw_cpo')