]> granicus.if.org Git - vim/commitdiff
patch 8.2.0558: Vim9: dict code not covered by tests v8.2.0558
authorBram Moolenaar <Bram@vim.org>
Sun, 12 Apr 2020 16:02:06 +0000 (18:02 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 12 Apr 2020 16:02:06 +0000 (18:02 +0200)
Problem:    Vim9: dict code not covered by tests.
Solution:   Remove dead code, adjust test case.

src/testdir/test_vim9_expr.vim
src/version.c
src/vim9compile.c

index a965bdf39d0316cb2d692df97aa7778644fae79a..3e0ed4f0c9a20450c08903108513ca8cb9a8aa1e 100644 (file)
@@ -767,7 +767,7 @@ def Test_expr7_dict()
 
   call CheckDefFailure("let x = #{8: 8}", 'E1014:')
   call CheckDefFailure("let x = #{xxx}", 'E720:')
-  call CheckDefFailure("let x = #{xxx: 1", 'E723:')
+  call CheckDefFailureMult(["let x = #{xxx: 1", "let y = 2"], 'E722:')
   call CheckDefFailure("let x = #{xxx: 1,", 'E723:')
   call CheckDefFailure("let x = {'a': xxx}", 'E1001:')
   call CheckDefFailure("let x = {xxx: 8}", 'E1001:')
index f1e274ba1922227e571555454e8083ec16eab49e..eeec3e942b1c50263830d065785ee270f0064708 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    558,
 /**/
     557,
 /**/
index cf91d3bb37649daff1be19e3b620df0a6eb3e66a..f2f7cc37e9dc082bfff6b8b056eb106586e33fac 100644 (file)
@@ -2788,11 +2788,6 @@ compile_dict(char_u **arg, cctx_T *cctx, int literal)
        *arg = skipwhite(*arg + 1);
     }
 
-    if (**arg != '}')
-    {
-       semsg(_(e_missing_dict_end), *arg);
-       goto failret;
-    }
     *arg = *arg + 1;
 
     // Allow for following comment, after at least one space.