patch 9.0.1926: Vim9: not enough info in error message
Problem: Vim9: not enough info in error message
Solution: Add class name, change member to variable, quote names
closes: #13136
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
diff --git a/src/vim9compile.c b/src/vim9compile.c
index a8d8c7d..16898e3 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -1611,8 +1611,8 @@
{
char *msg = (m->ocm_access == VIM_ACCESS_PRIVATE)
? e_cannot_access_private_member_str
- : e_cannot_change_readonly_variable_str;
- semsg(_(msg), m->ocm_name);
+ : e_member_is_not_writable_str;
+ semsg(_(msg), m->ocm_name, cl->class_name);
return FALSE;
}