aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-11-24 22:04:24 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-11-24 22:04:24 -0500
commitcd36baf530d0c312884f485ed619438c1de91ef1 (patch)
treed4edc52c68f77f39fdd8adf545f61adfef2c39e0 /src/analyze.cpp
parent40480c7cdc84697219e8b2434772709ad948ed4d (diff)
downloadzig-cd36baf530d0c312884f485ed619438c1de91ef1.tar.gz
zig-cd36baf530d0c312884f485ed619438c1de91ef1.zip
fix assertion failed when invalid type encountered
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 7a9df874d4..1c223c63f7 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -338,7 +338,7 @@ TypeTableEntry *get_smallest_unsigned_int_type(CodeGen *g, uint64_t x) {
TypeTableEntry *get_pointer_to_type_extra(CodeGen *g, TypeTableEntry *child_type, bool is_const,
bool is_volatile, uint32_t byte_alignment, uint32_t bit_offset, uint32_t unaligned_bit_count)
{
- assert(child_type->id != TypeTableEntryIdInvalid);
+ assert(!type_is_invalid(child_type));
TypeId type_id = {};
TypeTableEntry **parent_pointer = nullptr;