0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.2.2015: Vim9: literal dict #{} is not like any other language

Problem:    Vim9: literal dict #{} is not like any other language.
Solution:   Support the JavaScript syntax.
This commit is contained in:
Bram Moolenaar
2020-11-19 18:53:18 +01:00
parent ee8b787bcd
commit 2bede173a1
9 changed files with 70 additions and 22 deletions

View File

@@ -416,7 +416,7 @@ def Test_try_catch()
var nd: dict<any>
try
nd = {g:anumber: 1}
nd = {[g:anumber]: 1}
catch /E1012:/
n = 266
endtry
@@ -459,7 +459,7 @@ def Test_try_catch()
assert_equal(322, n)
try
d = {'text': 1, g:astring: 2}
d = {text: 1, [g:astring]: 2}
catch /E721:/
n = 333
endtry