patch 9.0.1829: Vim9 missing access-checks for private vars
Problem: Vim9 missing access-checks for private vars
Solution: Use the proper check for private/readonly variable. Access
level for a member cannot be changed in a class implementing an
interface. Update the code indentation
closes: #12978
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Co-authored-by: Ernie Rael <errael@raelity.com>
diff --git a/src/typval.c b/src/typval.c
index c159cc9..f9f6bd6 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -539,7 +539,7 @@
{
if (args[idx].v_type != VAR_LIST)
{
- semsg(_(e_list_required_for_argument_nr), idx + 1);
+ semsg(_(e_list_required_for_argument_nr), idx + 1);
return FAIL;
}
return OK;
@@ -981,7 +981,7 @@
{
if (args[idx].v_type != VAR_OBJECT)
{
- semsg(_(e_object_required_for_argument_nr), idx + 1);
+ semsg(_(e_object_required_for_argument_nr), idx + 1);
return FAIL;
}
return OK;
@@ -995,7 +995,7 @@
{
if (args[idx].v_type != VAR_CLASS && args[idx].v_type != VAR_LIST)
{
- semsg(_(e_list_or_class_required_for_argument_nr), idx + 1);
+ semsg(_(e_list_or_class_required_for_argument_nr), idx + 1);
return FAIL;
}
return OK;