]> granicus.if.org Git - vim/commitdiff
patch 8.2.1452: Vim9: dead code in to_name_end() v8.2.1452
authorBram Moolenaar <Bram@vim.org>
Fri, 14 Aug 2020 19:42:54 +0000 (21:42 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 14 Aug 2020 19:42:54 +0000 (21:42 +0200)
Problem:    Vim9: dead code in to_name_end().
Solution:   Remove check for lambda and dict, it won't be used.

src/version.c
src/vim9compile.c

index 132af7cae148262e9c58f091f989e90113bd795c..842af416b01dbb702e6a19659866a4edd624f2ed 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1452,
 /**/
     1451,
 /**/
index e5dbbefa29cc922543a31ae99f423cb4cbd32028..bdb0f064e63c72318b9223f6f30fcd9490e9b2c3 100644 (file)
@@ -2396,17 +2396,6 @@ to_name_const_end(char_u *arg)
        if (eval_dict(&p, &rettv, NULL, TRUE) == FAIL)
            p = arg;
     }
-    else if (p == arg && *arg == '{')
-    {
-       int         ret = get_lambda_tv(&p, &rettv, NULL);
-
-       // Can be "{x -> ret}()".
-       // Can be "{'a': 1}->Func()".
-       if (ret == NOTDONE)
-           ret = eval_dict(&p, &rettv, NULL, FALSE);
-       if (ret != OK)
-           p = arg;
-    }
 
     return p;
 }