cgen: fix g.typ() not adding correct number of * for generic types (#10687)

pull/10703/head
crthpl 2021-07-08 11:28:40 -07:00 committed by GitHub
parent 9356c329ac
commit bfafdb69c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -569,7 +569,8 @@ fn (mut g Gen) typ(t ast.Type) string {
return styp
}
fn (mut g Gen) base_type(t ast.Type) string {
fn (mut g Gen) base_type(_t ast.Type) string {
t := g.unwrap_generic(_t)
share := t.share()
mut styp := if share == .atomic_t { t.atomic_typename() } else { g.cc_type(t, true) }
if t.has_flag(.shared_f) {