cgen: avoid generating typedef generic array type (#12407)

pull/12410/head
yuyi 2021-11-08 03:24:30 +08:00 committed by GitHub
parent c8ff9e39b5
commit 1211029926
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;')
}
}