0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 9.0.1920: Vim9: cannot write public var in nested object

Problem:  Vim9: cannot write public var in nested object
Solution: Write variable in nested read-only object reference.
          Also test write fails.

closes: #13130
closes: #13131

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
This commit is contained in:
Ernie Rael
2023-09-20 20:13:06 +02:00
committed by Christian Brabandt
parent 03cd697d63
commit 98e68c07ce
3 changed files with 60 additions and 0 deletions

View File

@@ -1564,6 +1564,9 @@ get_lval(
om->ocm_name);
return NULL;
case VIM_ACCESS_READ:
// If [idx] or .key following, read only OK.
if (*p == '[' || *p == '.')
break;
if ((flags & GLV_READ_ONLY) == 0)
{
semsg(_(e_member_is_not_writable_str),