Skip to content

Commit

Permalink
cgen: avoid generating typedef generic array type (#12407)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyi98 committed Nov 7, 2021
1 parent c8ff9e3 commit 1211029
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/gen/c/cgen.v
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ pub fn (mut g Gen) write_typedef_types() {
.array {
info := typ.info as ast.Array
elem_sym := g.table.get_type_symbol(info.elem_type)
if elem_sym.kind != .placeholder {
if elem_sym.kind != .placeholder && !info.elem_type.has_flag(.generic) {
g.type_definitions.writeln('typedef array $typ.cname;')
}
}
Expand Down

0 comments on commit 1211029

Please sign in to comment.