aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-09-17 18:44:18 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-09-17 18:44:18 -0400
commitc7d80cc421366f69022e5525c462d0d0f28cb4fb (patch)
tree5e5b4408a5381989002624d39223d2b008a29e51 /src/analyze.cpp
parent6e5edc79ec65bda67a06c5e4b58fe16b2a323b85 (diff)
downloadzig-c7d80cc421366f69022e5525c462d0d0f28cb4fb.tar.gz
zig-c7d80cc421366f69022e5525c462d0d0f28cb4fb.zip
fix crash when enum has invalid field
closes #468
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index 3ec9007b73..f20d155e4f 100644
--- 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;
}