1
0
forked from aniani/vim

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".
This commit is contained in:
Bram Moolenaar
2023-01-11 15:59:05 +00:00
parent ad15a39fdb
commit 58b40092e6
8 changed files with 136 additions and 16 deletions

View File

@@ -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
;