0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.1569: cannot use "this.member" in lambda in class method

Problem:    Cannot use "this.member" in lambda in class method.
Solution:   Adjust check for reserved keyword. (Hirohito Higashi,
            closes #12416, closes #12076, closes #12336)
This commit is contained in:
h-east
2023-05-19 19:01:17 +01:00
committed by Bram Moolenaar
parent d49f646bf5
commit 2bd6a09691
6 changed files with 30 additions and 10 deletions

View File

@@ -1580,7 +1580,8 @@ compile_lhs(
else
{
// No specific kind of variable recognized, just a name.
if (check_reserved_name(lhs->lhs_name, cctx) == FAIL)
if (check_reserved_name(lhs->lhs_name, lhs->lhs_has_index
&& *var_end == '.') == FAIL)
return FAIL;
if (lookup_local(var_start, lhs->lhs_varlen,