mirror of
https://github.com/vim/vim.git
synced 2025-10-29 09:37:35 -04:00
patch 8.2.4872: Vim9: no error for using an expression only
Problem: Vim9: no error for using an expression only at the script level
when followed by an empty line.
Solution: Do not check the line number but whether something follows.
(closes #10357)
This commit is contained in:
@@ -650,6 +650,20 @@ def Test_use_register()
|
||||
END
|
||||
v9.CheckDefAndScriptFailure(lines, 'E1207:', 2)
|
||||
|
||||
lines =<< trim END
|
||||
@a = 'echo "text"'
|
||||
@a
|
||||
|
||||
END
|
||||
v9.CheckDefAndScriptFailure(lines, 'E1207:', 2)
|
||||
|
||||
lines =<< trim END
|
||||
@a = 'echo "text"'
|
||||
@a
|
||||
# comment
|
||||
END
|
||||
v9.CheckDefAndScriptFailure(lines, 'E1207:', 2)
|
||||
|
||||
lines =<< trim END
|
||||
@/ = 'pattern'
|
||||
@/
|
||||
|
||||
Reference in New Issue
Block a user