diff src/structs.h @ 33951:45a50fd59a73 v9.0.2170

patch 9.0.2170: Vim9: no support for const/final class/objects vars Commit: https://github.com/vim/vim/commit/e5437c542709b77ade084f96e60d84d4e847e6d3 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Dec 16 14:11:19 2023 +0100 patch 9.0.2170: Vim9: no support for const/final class/objects vars Problem: Vim9: no support for const/final class/objects vars Solution: Support final and const object and class variables closes: #13655 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sat, 16 Dec 2023 14:15:05 +0100
parents 2f9090601258
children 14b69ff2c1ab
line wrap: on
line diff
--- a/src/structs.h
+++ b/src/structs.h
@@ -1523,14 +1523,18 @@ typedef enum {
     VIM_ACCESS_ALL	// read/write everywhere
 } omacc_T;
 
+#define OCMFLAG_HAS_TYPE	0x01	// type specified explicitly
+#define OCMFLAG_FINAL		0x02	// "final" object/class member
+#define OCMFLAG_CONST		0x04	// "const" object/class member
+
 /*
  * Entry for an object or class member variable.
  */
 typedef struct {
     char_u	*ocm_name;	// allocated
     omacc_T	ocm_access;
-    int		ocm_has_type;	// type specified explicitly
     type_T	*ocm_type;
+    int		ocm_flags;
     char_u	*ocm_init;	// allocated
 } ocmember_T;