diff src/globals.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 91924f1b59af
children 122cfa668b95
line wrap: on
line diff
--- a/src/globals.h
+++ b/src/globals.h
@@ -527,7 +527,10 @@ EXTERN int	garbage_collect_at_exit INIT(
 #define t_dict_string		(static_types[76])
 #define t_const_dict_string	(static_types[77])
 
-EXTERN type_T static_types[78]
+#define t_super			(static_types[78])
+#define t_const_super		(static_types[79])
+
+EXTERN type_T static_types[80]
 #ifdef DO_INIT
 = {
     // 0: t_unknown
@@ -685,6 +688,10 @@ EXTERN type_T static_types[78]
     // 76: t_dict_string
     {VAR_DICT, 0, 0, TTFLAG_STATIC, &t_string, NULL},
     {VAR_DICT, 0, 0, TTFLAG_STATIC|TTFLAG_CONST, &t_string, NULL},
+
+    // 78: t_super (VAR_CLASS with tt_member set to &t_bool
+    {VAR_CLASS, 0, 0, TTFLAG_STATIC, &t_bool, NULL},
+    {VAR_CLASS, 0, 0, TTFLAG_STATIC|TTFLAG_CONST, &t_bool, NULL},
 }
 #endif
 ;