mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-08 00:28:49 +00:00
Fix issue #122
This commit is contained in:
+3
-2
@@ -664,7 +664,7 @@ bool ir_type_has_default_values(Type *t) {
|
|||||||
return ir_type_has_default_values(t->Array.elem);
|
return ir_type_has_default_values(t->Array.elem);
|
||||||
|
|
||||||
case Type_Struct:
|
case Type_Struct:
|
||||||
if (!t->Struct.is_raw_union) {
|
if (t->Struct.is_raw_union) return false;
|
||||||
for_array(i, t->Struct.fields) {
|
for_array(i, t->Struct.fields) {
|
||||||
Entity *f = t->Struct.fields_in_src_order[i];
|
Entity *f = t->Struct.fields_in_src_order[i];
|
||||||
if (f->kind != Entity_Variable) continue;
|
if (f->kind != Entity_Variable) continue;
|
||||||
@@ -676,7 +676,8 @@ bool ir_type_has_default_values(Type *t) {
|
|||||||
} else if (f->Variable.default_is_undef) {
|
} else if (f->Variable.default_is_undef) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
bool sub = ir_type_has_default_values(f->type);
|
||||||
|
if (sub) return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user