mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 9.0.2170: Vim9: no support for const/final class/objects vars
Problem: Vim9: no support for const/final class/objects vars Solution: Support final and const object and class variables closes: #13655 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
d8bf87c9fb
commit
e5437c5427
@@ -1778,6 +1778,13 @@ get_lval(
|
||||
p, flags) == FAIL)
|
||||
return NULL;
|
||||
|
||||
// When lhs is used to modify the variable, check it is
|
||||
// not a read-only variable.
|
||||
if ((flags & GLV_READ_ONLY) == 0
|
||||
&& (*p != '.' && *p != '[')
|
||||
&& oc_var_check_ro(cl, om))
|
||||
return NULL;
|
||||
|
||||
lp->ll_valtype = om->ocm_type;
|
||||
|
||||
if (v_type == VAR_OBJECT)
|
||||
|
Reference in New Issue
Block a user