Skip to content

Commit 8d56622

Browse files
committed
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.
1 parent 41fab3e commit 8d56622

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ static char *(features[]) =
754754

755755
static int included_patches[] =
756756
{ /* Add new patch number below this line */
757+
/**/
758+
1452,
757759
/**/
758760
1451,
759761
/**/

src/vim9compile.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2396,17 +2396,6 @@ to_name_const_end(char_u *arg)
23962396
if (eval_dict(&p, &rettv, NULL, TRUE) == FAIL)
23972397
p = arg;
23982398
}
2399-
else if (p == arg && *arg == '{')
2400-
{
2401-
int ret = get_lambda_tv(&p, &rettv, NULL);
2402-
2403-
// Can be "{x -> ret}()".
2404-
// Can be "{'a': 1}->Func()".
2405-
if (ret == NOTDONE)
2406-
ret = eval_dict(&p, &rettv, NULL, FALSE);
2407-
if (ret != OK)
2408-
p = arg;
2409-
}
24102399

24112400
return p;
24122401
}

0 commit comments

Comments
 (0)