fix get_maybe_type not ensuring complete child type

This commit is contained in:
Andrew Kelley 2017-01-15 23:36:14 -05:00
parent d0b59f20ab
commit 3752e0c290

View File

@ -364,6 +364,8 @@ TypeTableEntry *get_maybe_type(CodeGen *g, TypeTableEntry *child_type) {
TypeTableEntry *entry = child_type->maybe_parent;
return entry;
} else {
ensure_complete_type(g, child_type);
TypeTableEntry *entry = new_type_table_entry(TypeTableEntryIdMaybe);
assert(child_type->type_ref);
assert(child_type->di_type);