Skip to content

Commit 9046b5e

Browse files
committedJun 9, 2018
fix assertion failure when debug printing comptime values
·
0.15.20.3.0
1 parent 6edd811 commit 9046b5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/ir.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static TypeTableEntry *adjust_ptr_align(CodeGen *g, TypeTableEntry *ptr_type, ui
113113
static TypeTableEntry *adjust_slice_align(CodeGen *g, TypeTableEntry *slice_type, uint32_t new_align);
114114

115115
ConstExprValue *const_ptr_pointee(CodeGen *g, ConstExprValue *const_val) {
116-
assert(const_val->type->id == TypeTableEntryIdPointer);
116+
assert(get_codegen_ptr_type(const_val->type) != nullptr);
117117
assert(const_val->special == ConstValSpecialStatic);
118118
switch (const_val->data.x_ptr.special) {
119119
case ConstPtrSpecialInvalid:

0 commit comments

Comments
 (0)
Please sign in to comment.