forked from aniani/vim
patch 8.2.3634: error for already defined function uses wrong line number
Problem: Error for already defined function uses wrong line number. Solution: Set SOURCING_LNUM before giving the error message. (closes #9085)
This commit is contained in:
@@ -741,7 +741,18 @@ def Test_nested_global_function()
|
||||
enddef
|
||||
defcompile
|
||||
END
|
||||
CheckScriptFailure(lines, "E1073:")
|
||||
CheckScriptFailure(lines, "E1073:", 1)
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
def Func()
|
||||
echo 'script'
|
||||
enddef
|
||||
def Func()
|
||||
echo 'script'
|
||||
enddef
|
||||
END
|
||||
CheckScriptFailure(lines, "E1073:", 5)
|
||||
enddef
|
||||
|
||||
def DefListAll()
|
||||
|
Reference in New Issue
Block a user