From cd36baf530d0c312884f485ed619438c1de91ef1 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 24 Nov 2017 22:04:24 -0500 Subject: fix assertion failed when invalid type encountered --- src/analyze.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/analyze.cpp') 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; -- cgit v1.2.3