1
0
forked from aniani/vim

patch 8.2.1452: Vim9: dead code in to_name_end()

Problem:    Vim9: dead code in to_name_end().
Solution:   Remove check for lambda and dict, it won't be used.
This commit is contained in:
Bram Moolenaar 2020-08-14 21:42:54 +02:00
parent 41fab3eac8
commit 8d56622944
2 changed files with 2 additions and 11 deletions

View File

@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1452,
/**/
1451,
/**/

View 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;
}