From 37b13bf1512d8eed7308a2194c1935d91a33796c Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 18 Dec 2016 17:24:52 -0500 Subject: hello.zig working with all structs anonymous --- src/ir.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ir.cpp') diff --git a/src/ir.cpp b/src/ir.cpp index d2729d8ed1..ae6fd78d1f 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -8007,6 +8007,9 @@ static TypeTableEntry *ir_analyze_container_init_fields(IrAnalyze *ira, IrInstru TypeTableEntry *container_type, size_t instr_field_count, IrInstructionContainerInitFieldsField *fields, bool depends_on_compile_var) { + if (!type_is_complete(container_type)) + resolve_container_type(ira->codegen, container_type); + size_t actual_field_count = container_type->data.structure.src_field_count; IrInstruction *first_non_const_instruction = nullptr; -- cgit v1.2.3