mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 9.0.1867: Vim9: access to interface statics possible
Problem: Vim9: access to interface statics possible Solution: Prevent direct access to interface statics closes: #13007 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Ernie Rael <errael@raelity.com>
This commit is contained in:
committed by
Christian Brabandt
parent
dccc29c228
commit
18143d3111
@@ -1180,6 +1180,14 @@ get_lval(
|
||||
return NULL;
|
||||
lp->ll_tv = &v->di_tv;
|
||||
}
|
||||
if (vim9script && writing && lp->ll_tv->v_type == VAR_CLASS
|
||||
&& (lp->ll_tv->vval.v_class->class_flags & CLASS_INTERFACE) != 0)
|
||||
{
|
||||
if (!quiet)
|
||||
semsg(_(e_interface_static_direct_access_str),
|
||||
lp->ll_tv->vval.v_class->class_name, lp->ll_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (vim9script && (flags & GLV_NO_DECL) == 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user