mirror of
https://github.com/vim/vim.git
synced 2025-10-03 05:14:07 -04:00
patch 8.2.2620: Vim9: Using #{ for a dictionary gives strange errors
Problem: Vim9: Using #{ for a dictionary gives strange errors. Solution: Give an error when using #{ for a comment after a command.
This commit is contained in:
@@ -2159,8 +2159,10 @@ def Test_expr7_dict()
|
||||
CheckDefAndScriptSuccess(lines)
|
||||
|
||||
# legacy syntax doesn't work
|
||||
CheckDefFailure(["var x = #{key: 8}"], 'E1097:', 3)
|
||||
CheckDefFailure(["var x = 'a' .. #{a: 1}"], 'E1097:', 3)
|
||||
CheckDefFailure(["var x = #{key: 8}"], 'E1170:', 1)
|
||||
CheckDefFailure(["var x = 'a' #{a: 1}"], 'E1170:', 1)
|
||||
CheckDefFailure(["var x = 'a' .. #{a: 1}"], 'E1170:', 1)
|
||||
CheckDefFailure(["var x = true ? #{a: 1}"], 'E1170:', 1)
|
||||
|
||||
CheckDefFailure(["var x = {a:8}"], 'E1069:', 1)
|
||||
CheckDefFailure(["var x = {a : 8}"], 'E1068:', 1)
|
||||
|
Reference in New Issue
Block a user