0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.2.1344: Vim9: No test for trying to redefine global function

Problem:    Vim9: No test for trying to redefine global function.
Solution:   Add a test.
This commit is contained in:
Bram Moolenaar
2020-08-01 18:57:52 +02:00
parent 333894b195
commit 2c79e9d14d
2 changed files with 15 additions and 0 deletions

View File

@@ -159,6 +159,19 @@ def Test_nested_global_function()
delfunc g:Inner
END
CheckScriptSuccess(lines)
lines =<< trim END
vim9script
def Outer()
def g:Inner(): string
return 'inner'
enddef
enddef
defcompile
Outer()
Outer()
END
CheckScriptFailure(lines, "E122:")
enddef
def Test_global_local_function()

View File

@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1344,
/**/
1343,
/**/