mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.2.2897: Vim9: can use reserved words at the script level
Problem: Vim9: can use reserved words at the script level. Solution: Check variable names for reserved words. (closes #8253)
This commit is contained in:
@@ -249,6 +249,13 @@ def Test_assignment()
|
||||
END
|
||||
enddef
|
||||
|
||||
def Test_reserved_name()
|
||||
for name in ['true', 'false', 'null']
|
||||
CheckDefExecAndScriptFailure(['var ' .. name .. ' = 0'], 'E1034:')
|
||||
CheckDefExecAndScriptFailure(['var ' .. name .. ': bool'], 'E1034:')
|
||||
endfor
|
||||
enddef
|
||||
|
||||
def Test_skipped_assignment()
|
||||
var lines =<< trim END
|
||||
for x in []
|
||||
|
Reference in New Issue
Block a user