diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-06-09 11:41:59 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-06-09 11:41:59 -0400 |
| commit | 9046b5eac01540a783740451a6593ef0207c181e (patch) | |
| tree | e2e9e10f0193c6954b46a3f9d28f25e3bc47ca15 /src/ir.cpp | |
| parent | 6edd81109d16178f1dc688dacee4b38964b617c4 (diff) | |
| download | zig-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.cpp | 2 |
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: |
