patch 9.0.2076: Vim9: No support for type aliases
Problem: Vim9: No support for type aliases
Solution: Implement :type command
A type definition is giving a name to a type specification. This also known
type alias.
:type ListOfStrings = list<string>
The type alias can be used wherever a built-in type can be used. The type
alias name must start with an upper case character.
closes: #13407
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
diff --git a/src/vim.h b/src/vim.h
index 2b6c787..6fb8978 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -2142,7 +2142,8 @@
#define VV_SIZEOFPOINTER 104
#define VV_MAXCOL 105
#define VV_PYTHON3_VERSION 106
-#define VV_LEN 107 // number of v: vars
+#define VV_TYPE_TYPEALIAS 107
+#define VV_LEN 108 // number of v: vars
// used for v_number in VAR_BOOL and VAR_SPECIAL
#define VVAL_FALSE 0L // VAR_BOOL
@@ -2165,6 +2166,7 @@
#define VAR_TYPE_INSTR 11
#define VAR_TYPE_CLASS 12
#define VAR_TYPE_OBJECT 13
+#define VAR_TYPE_TYPEALIAS 15
#define DICT_MAXNEST 100 // maximum nesting of lists and dicts