1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vfmt: alias type and sum type + sum type fix

This commit is contained in:
Delyan Angelov
2020-03-07 18:37:55 +02:00
committed by GitHub
parent fbf80dc315
commit 5e541e1f11
12 changed files with 125 additions and 32 deletions

View File

@@ -901,6 +901,7 @@ fn (p mut Parser) type_decl() {
})
if p.pass == .main {
p.cgen.consts << 'const char * __SumTypeNames__${name}[] = {'
p.cgen.consts << ' "$name",'
for ctype_name in ctype_names {
p.cgen.consts << ' "$ctype_name",'
}