fix alias generation

pull/2298/head
Alexander Medvednikov 2019-10-12 04:11:07 +03:00
parent 4c91a5c94b
commit 155d692959
1 changed files with 2 additions and 1 deletions

View File

@ -174,7 +174,8 @@ fn (v &V) generate_vh() {
}
// type alias
if typ.parent != '' && typ.cat == .alias {
file.writeln('type $typ.name $typ.parent')
parent := v_type_str(typ.parent)
file.writeln('type $typ.name $parent')
}
if typ.cat in [TypeCategory.struct_, .c_struct] {
c := if typ.is_c { 'C.' } else { '' }