aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-06-09 11:41:59 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-06-09 11:41:59 -0400
commit9046b5eac01540a783740451a6593ef0207c181e (patch)
treee2e9e10f0193c6954b46a3f9d28f25e3bc47ca15 /src/ir.cpp
parent6edd81109d16178f1dc688dacee4b38964b617c4 (diff)
downloadzig-9046b5eac01540a783740451a6593ef0207c181e.tar.gz
zig-9046b5eac01540a783740451a6593ef0207c181e.zip
fix assertion failure when debug printing comptime values
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 13ecfd4233..10098f3c32 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -113,7 +113,7 @@ static TypeTableEntry *adjust_ptr_align(CodeGen *g, TypeTableEntry *ptr_type, ui
static TypeTableEntry *adjust_slice_align(CodeGen *g, TypeTableEntry *slice_type, uint32_t new_align);
ConstExprValue *const_ptr_pointee(CodeGen *g, ConstExprValue *const_val) {
- assert(const_val->type->id == TypeTableEntryIdPointer);
+ assert(get_codegen_ptr_type(const_val->type) != nullptr);
assert(const_val->special == ConstValSpecialStatic);
switch (const_val->data.x_ptr.special) {
case ConstPtrSpecialInvalid: