Mercurial > vim
comparison src/vim9compile.c @ 32475:a44d7e4ac1c0 v9.0.1569
patch 9.0.1569: cannot use "this.member" in lambda in class method
Commit: https://github.com/vim/vim/commit/2bd6a09691fc71974ca7ab5973f8e08fdd2a889a
Author: h-east <h.east.727@gmail.com>
Date: Fri May 19 19:01:17 2023 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 19 May 2023 20:15:04 +0200 |
parents | db97ccaaa7c8 |
children | 448aef880252 |
comparison
equal
deleted
inserted
replaced
32474:a715c20f474f | 32475:a44d7e4ac1c0 |
---|---|
1578 declare_error = is_decl; | 1578 declare_error = is_decl; |
1579 } | 1579 } |
1580 else | 1580 else |
1581 { | 1581 { |
1582 // No specific kind of variable recognized, just a name. | 1582 // No specific kind of variable recognized, just a name. |
1583 if (check_reserved_name(lhs->lhs_name, cctx) == FAIL) | 1583 if (check_reserved_name(lhs->lhs_name, lhs->lhs_has_index |
1584 && *var_end == '.') == FAIL) | |
1584 return FAIL; | 1585 return FAIL; |
1585 | 1586 |
1586 if (lookup_local(var_start, lhs->lhs_varlen, | 1587 if (lookup_local(var_start, lhs->lhs_varlen, |
1587 &lhs->lhs_local_lvar, cctx) == OK) | 1588 &lhs->lhs_local_lvar, cctx) == OK) |
1588 { | 1589 { |