diff src/structs.h @ 31692:2f1af1b2f82d v9.0.1178

patch 9.0.1178: a child class cannot override functions from a base class Commit: https://github.com/vim/vim/commit/58b40092e616585a763cf4d214d47ccd9167d6f7 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 11 15:59:05 2023 +0000 patch 9.0.1178: a child class cannot override functions from a base class Problem: A child class cannot override functions from a base class. Solution: Allow overriding and implement "super".
author Bram Moolenaar <Bram@vim.org>
date Wed, 11 Jan 2023 17:00:05 +0100
parents ec76f9d2319e
children 69ee530cac28
line wrap: on
line diff
--- a/src/structs.h
+++ b/src/structs.h
@@ -1465,6 +1465,7 @@ typedef struct {
 #define TTFLAG_NUMBER_OK    0x04    // tt_type is VAR_FLOAT, VAR_NUMBER is OK
 #define TTFLAG_STATIC	    0x08    // one of the static types, e.g. t_any
 #define TTFLAG_CONST	    0x10    // cannot be changed
+#define TTFLAG_SUPER	    0x20    // object from "super".
 
 typedef enum {
     ACCESS_PRIVATE,	// read/write only inside th class
@@ -1506,7 +1507,8 @@ struct class_S
     typval_T	*class_members_tv;	// allocated array of class member vals
 
     // class functions: "static def SomeMethod()"
-    int		class_class_function_count;
+    int		class_class_function_count;	    // total count
+    int		class_class_function_count_child;   // count without "extends"
     ufunc_T	**class_class_functions;	// allocated
 
     // object members: "this.varname"
@@ -1514,7 +1516,8 @@ struct class_S
     ocmember_T	*class_obj_members;	// allocated
 
     // object methods: "def SomeMethod()"
-    int		class_obj_method_count;
+    int		class_obj_method_count;		    // total count
+    int		class_obj_method_count_child;	    // count without "extends"
     ufunc_T	**class_obj_methods;	// allocated
 
     garray_T	class_type_list;	// used for type pointers