commit c7d80cc421366f69022e5525c462d0d0f28cb4fb (tree)
parent 6e5edc79ec65bda67a06c5e4b58fe16b2a323b85
Author: Andrew Kelley <superjoe30@gmail.com>
Date: Sun, 17 Sep 2017 18:44:18 -0400
fix crash when enum has invalid field
closes #468
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/analyze.cpp b/src/analyze.cpp
@@ -1314,7 +1314,7 @@ static void resolve_enum_type(CodeGen *g, TypeTableEntry *enum_type) {
di_enumerators[i] = ZigLLVMCreateDebugEnumerator(g->dbuilder, buf_ptr(type_enum_field->name), i);
ensure_complete_type(g, field_type);
- if (field_type->id == TypeTableEntryIdInvalid) {
+ if (type_is_invalid(field_type)) {
enum_type->data.enumeration.is_invalid = true;
continue;
}