0
0
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:
Bram Moolenaar
2021-03-18 21:37:55 +01:00
parent 5f91e74bf9
commit 4b3e1964d8
7 changed files with 43 additions and 10 deletions

View File

@@ -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)