1
0
forked from aniani/vim

patch 9.1.0349: Vim9: need static type for typealias

Problem:  Vim9: need static type for typealias
Solution: Refactor the typval2type() function and add a static type for
          typealias (Yegappan Lakshmanan)

closes: #14582

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Yegappan Lakshmanan
2024-04-18 21:33:27 +02:00
committed by Christian Brabandt
parent baedc998b0
commit 76ba252e61
4 changed files with 285 additions and 167 deletions

View File

@@ -540,7 +540,10 @@ EXTERN int garbage_collect_at_exit INIT(= FALSE);
#define t_class (static_types[84])
#define t_const_class (static_types[85])
EXTERN type_T static_types[86]
#define t_typealias (static_types[86])
#define t_const_typealias (static_types[87])
EXTERN type_T static_types[88]
#ifdef DO_INIT
= {
// 0: t_unknown
@@ -714,6 +717,10 @@ EXTERN type_T static_types[86]
// 84: t_class
{VAR_CLASS, 0, 0, TTFLAG_STATIC, NULL, NULL, NULL},
{VAR_CLASS, 0, 0, TTFLAG_STATIC|TTFLAG_CONST, NULL, NULL, NULL},
// 86: t_typealias
{VAR_TYPEALIAS, 0, 0, TTFLAG_STATIC, NULL, NULL, NULL},
{VAR_TYPEALIAS, 0, 0, TTFLAG_STATIC|TTFLAG_CONST, NULL, NULL, NULL},
}
#endif
;