cgen: minor simplification in cc_type() (#9833)

pull/9841/head
yuyi 2021-04-21 17:23:21 +08:00 committed by GitHub
parent d02822f456
commit 7b8957b25e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -696,11 +696,7 @@ fn (mut g Gen) cc_type(typ ast.Type, is_prefix_struct bool) string {
if sym.info.generic_types.len > 0 {
mut sgtyps := '_T'
for gt in sym.info.generic_types {
gts := g.table.get_type_symbol(if gt.has_flag(.generic) {
g.unwrap_generic(gt)
} else {
gt
})
gts := g.table.get_type_symbol(g.unwrap_generic(gt))
sgtyps += '_$gts.cname'
}
styp += sgtyps