commit 45d2fd9b9d86c4a5751612f62aa324d635976bf8 (tree)
parent bf8870a60bb35062b2b25867a0f9a95f6f5397ce
Author: Andrew Kelley <andrew@ziglang.org>
Date: Mon, 11 Nov 2019 22:10:24 -0500
fix assertion failure in init_const_undefined
found this from building my tetris game
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/analyze.cpp b/src/analyze.cpp
@@ -7138,7 +7138,7 @@ static void init_const_undefined(CodeGen *g, ConstExprValue *const_val) {
const_val->data.x_struct.fields = create_const_vals(field_count);
for (size_t i = 0; i < field_count; i += 1) {
ConstExprValue *field_val = &const_val->data.x_struct.fields[i];
- field_val->type = wanted_type->data.structure.fields[i].type_entry;
+ field_val->type = resolve_struct_field_type(g, &wanted_type->data.structure.fields[i]);
assert(field_val->type);
init_const_undefined(g, field_val);
field_val->parent.id = ConstParentIdStruct;