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>
diff --git a/src/vim9expr.c b/src/vim9expr.c
index 20289bf..7abd0a4 100644
--- a/src/vim9expr.c
+++ b/src/vim9expr.c
@@ -293,7 +293,7 @@
{
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 @@
{
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 @@
// 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 @@
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 @@
}
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;
}