mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.2157: Vim9: can delete a Vim9 script variable from a function
Problem: Vim9: can delete a Vim9 script variable from a function. Solution: Check the variable is defined in Vim9 script. (closes #7483)
This commit is contained in:
@@ -1208,6 +1208,14 @@ def Test_unlet()
|
||||
'enddef',
|
||||
'defcompile',
|
||||
], 'E1081:')
|
||||
CheckScriptFailure([
|
||||
'vim9script',
|
||||
'var svar = 123',
|
||||
'func Func()',
|
||||
' unlet s:svar',
|
||||
'endfunc',
|
||||
'Func()',
|
||||
], 'E1081:')
|
||||
CheckScriptFailure([
|
||||
'vim9script',
|
||||
'var svar = 123',
|
||||
|
Reference in New Issue
Block a user