patch 9.0.1982: vim9: clean up from v9.0.1955
Problem: vim9: clean up from v9.0.1955
Solution: Fix a few remaining issues, improve error message
- Use `cl_exec`, the executing class, to check permissions in `get_lval()`.
- Handle lockvar of script variable from class.
- Add 'in class "Xxx"' to e_cannot_access_private_variable_str.
closes: #13222
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
diff --git a/src/structs.h b/src/structs.h
index c7360a3..680ed6d 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -4595,6 +4595,16 @@
// ignore the rest.
} lval_T;
+/**
+ * This may be used to specify the base type that get_lval() uses when
+ * following a chain, for example a[idx1][idx2].
+ */
+typedef struct lval_root_S {
+ typval_T *lr_tv;
+ class_T *lr_cl_exec; // executing class for access checking
+ int lr_is_arg;
+} lval_root_T;
+
// Structure used to save the current state. Used when executing Normal mode
// commands while in any other mode.
typedef struct {