IR: fix lazy eval of enum field access

This commit is contained in:
Andrew Kelley 2016-12-19 21:06:55 -05:00
parent 3ea4f264ff
commit c10ae8622b

View File

@ -7166,6 +7166,7 @@ static TypeTableEntry *ir_analyze_instruction_field_ptr(IrAnalyze *ira, IrInstru
return ira->codegen->builtin_types.entry_invalid;
} else if (is_container(child_type)) {
if (child_type->id == TypeTableEntryIdEnum) {
ensure_complete_type(ira->codegen, child_type);
TypeEnumField *field = find_enum_type_field(child_type, field_name);
if (field) {
if (field->type_entry->id == TypeTableEntryIdVoid) {