diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-01-11 15:59:05 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-01-11 15:59:05 +0000 |
commit | 58b40092e616585a763cf4d214d47ccd9167d6f7 (patch) | |
tree | d0b7b8411f134511a3b46792ee016af9f8f60539 /src/globals.h | |
parent | ad15a39fdbde5ef8d4af9e0fca7e7e53b4843270 (diff) |
patch 9.0.1178: a child class cannot override functions from a base classv9.0.1178
Problem: A child class cannot override functions from a base class.
Solution: Allow overriding and implement "super".
Diffstat (limited to 'src/globals.h')
-rw-r--r-- | src/globals.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/globals.h b/src/globals.h index fd5a0cb020..8c3cb62e43 100644 --- a/src/globals.h +++ b/src/globals.h @@ -527,7 +527,10 @@ EXTERN int garbage_collect_at_exit INIT(= FALSE); #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 ; |