1
0
forked from aniani/vim

patch 9.0.1935: Vim9: not consistent error messages

Problem:  Vim9: not consistent error messages
Solution: Make error messages more consistent. Use "variable" for
          (object/class) member

closes: #13155

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: RestorerZ <restorer@mail2k.ru>
This commit is contained in:
RestorerZ
2023-09-24 23:21:24 +02:00
committed by Christian Brabandt
parent 46bdae036a
commit 7fe8f43f49
9 changed files with 136 additions and 128 deletions

View File

@@ -293,7 +293,7 @@ compile_class_object_index(cctx_T *cctx, char_u **arg, type_T *type)
{
if (cctx->ctx_ufunc == NULL || cctx->ctx_ufunc->uf_class == NULL)
{
emsg(_(e_using_super_not_in_class_function));
emsg(_(e_using_super_not_in_class_method));
return FAIL;
}
is_super = TRUE;
@@ -407,7 +407,7 @@ compile_class_object_index(cctx_T *cctx, char_u **arg, type_T *type)
{
if (*name == '_' && !inside_class(cctx, cl))
{
semsg(_(e_cannot_access_private_member_str), m->ocm_name);
semsg(_(e_cannot_access_private_variable_str), m->ocm_name);
return FAIL;
}
@@ -443,7 +443,7 @@ 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_member_str), m->ocm_name);
semsg(_(e_cannot_access_private_variable_str), m->ocm_name);
return FAIL;
}
@@ -772,7 +772,7 @@ compile_load(
res = generate_CLASSMEMBER(cctx, TRUE, cl, idx);
else
{
semsg(_(e_class_member_str_accessible_only_inside_class_str),
semsg(_(e_class_variable_str_accessible_only_inside_class_str),
name, cl->class_name);
res = FAIL;
}
@@ -1151,7 +1151,7 @@ compile_call(
}
else
{
semsg(_(e_class_member_str_accessible_only_inside_class_str),
semsg(_(e_class_method_str_accessible_only_inside_class_str),
name, cl->class_name);
res = FAIL;
}