From bfafdb69c94b04ab2bae4ffb7f49ae2069d915ed Mon Sep 17 00:00:00 2001 From: crthpl <56052645+crthpl@users.noreply.github.com> Date: Thu, 8 Jul 2021 11:28:40 -0700 Subject: [PATCH] cgen: fix g.typ() not adding correct number of * for generic types (#10687) --- vlib/v/gen/c/cgen.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlib/v/gen/c/cgen.v b/vlib/v/gen/c/cgen.v index 1d6352f476..7c2a8aaba9 100644 --- a/vlib/v/gen/c/cgen.v +++ b/vlib/v/gen/c/cgen.v @@ -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) {