Commit 3752e0c290

Andrew Kelley <superjoe30@gmail.com>
2017-01-16 05:36:14
fix get_maybe_type not ensuring complete child type
1 parent d0b59f2
Changed files (1)
src/analyze.cpp
@@ -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);