mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.1999: Vim9: some error messages can be improved
Problem: Vim9: some error messages can be improved Solution: Mention the defining class for variable access error message closes: #13272 Signed-off-by: Christian Brabandt <cb@256bit.org> Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Co-authored-by: Ernie Rael <errael@raelity.com>
This commit is contained in:
committed by
Christian Brabandt
parent
85f4521808
commit
e6c9aa5e6a
@@ -407,8 +407,8 @@ compile_class_object_index(cctx_T *cctx, char_u **arg, type_T *type)
|
||||
{
|
||||
if (*name == '_' && !inside_class(cctx, cl))
|
||||
{
|
||||
semsg(_(e_cannot_access_private_variable_str), m->ocm_name,
|
||||
cl->class_name);
|
||||
emsg_var_cl_define(e_cannot_access_private_variable_str,
|
||||
m->ocm_name, 0, cl);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
@@ -443,8 +443,8 @@ compile_class_object_index(cctx_T *cctx, char_u **arg, type_T *type)
|
||||
// it is defined.
|
||||
if (*name == '_' && cctx->ctx_ufunc->uf_class != cl)
|
||||
{
|
||||
semsg(_(e_cannot_access_private_variable_str), m->ocm_name,
|
||||
cl->class_name);
|
||||
emsg_var_cl_define(e_cannot_access_private_variable_str,
|
||||
m->ocm_name, 0, cl);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user