mirror of
https://github.com/vim/vim.git
synced 2025-10-04 05:25: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
|
||||
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()
|
||||
|
Reference in New Issue
Block a user