mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24: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:
@@ -159,6 +159,19 @@ def Test_nested_global_function()
|
|||||||
delfunc g:Inner
|
delfunc g:Inner
|
||||||
END
|
END
|
||||||
CheckScriptSuccess(lines)
|
CheckScriptSuccess(lines)
|
||||||
|
|
||||||
|
lines =<< trim END
|
||||||
|
vim9script
|
||||||
|
def Outer()
|
||||||
|
def g:Inner(): string
|
||||||
|
return 'inner'
|
||||||
|
enddef
|
||||||
|
enddef
|
||||||
|
defcompile
|
||||||
|
Outer()
|
||||||
|
Outer()
|
||||||
|
END
|
||||||
|
CheckScriptFailure(lines, "E122:")
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
def Test_global_local_function()
|
def Test_global_local_function()
|
||||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1344,
|
||||||
/**/
|
/**/
|
||||||
1343,
|
1343,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user