mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
fix assertion failure in init_const_undefined
found this from building my tetris game
This commit is contained in:
parent
bf8870a60b
commit
45d2fd9b9d
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user