zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 9046b5eac01540a783740451a6593ef0207c181e (tree)
parent 6edd81109d16178f1dc688dacee4b38964b617c4
Author: Andrew Kelley <superjoe30@gmail.com>
Date:   Sat,  9 Jun 2018 11:41:59 -0400

fix assertion failure when debug printing comptime values

Diffstat:
Msrc/ir.cpp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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: