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

fix alias generation

This commit is contained in:
Alexander Medvednikov 2019-10-12 04:11:07 +03:00
parent 4c91a5c94b
commit 155d692959

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 { '' }