translate-c: fix regression on array initialization

master
Andrew Kelley 2020-05-23 17:52:46 -04:00
parent 32c27daae4
commit f67b8c68a0
1 changed files with 1 additions and 0 deletions

View File

@ -2235,6 +2235,7 @@ fn transInitListExprArray(
}
const ty_node = try transCreateNodeArrayType(rp, loc, ZigClangQualType_getTypePtr(child_qt), 1);
_ = try appendToken(rp.c, .LBrace, "{");
const filler_init_node = try ast.Node.ArrayInitializer.alloc(rp.c.arena, 1);
filler_init_node.* = .{
.lhs = ty_node,