| ... | @@ -826,12 +826,11 @@ static ZigValue *const_ptr_pointee_unchecked_no_isf(CodeGen *g, ZigValue *const_ | ... | @@ -826,12 +826,11 @@ static ZigValue *const_ptr_pointee_unchecked_no_isf(CodeGen *g, ZigValue *const_ |
| 826 | ZigValue *array_val = const_val->data.x_ptr.data.base_array.array_val; | 826 | ZigValue *array_val = const_val->data.x_ptr.data.base_array.array_val; |
| 827 | size_t elem_index = const_val->data.x_ptr.data.base_array.elem_index; | 827 | size_t elem_index = const_val->data.x_ptr.data.base_array.elem_index; |
| 828 | | 828 | |
| 829 | // TODO handle sentinel terminated arrays | | |
| 830 | expand_undef_array(g, array_val); | 829 | expand_undef_array(g, array_val); |
| 831 | result = g->pass1_arena->create<ZigValue>(); | 830 | result = g->pass1_arena->create<ZigValue>(); |
| 832 | result->special = array_val->special; | 831 | result->special = array_val->special; |
| 833 | result->type = get_array_type(g, array_val->type->data.array.child_type, | 832 | result->type = get_array_type(g, array_val->type->data.array.child_type, |
| 834 | array_val->type->data.array.len - elem_index, nullptr); | 833 | array_val->type->data.array.len - elem_index, array_val->type->data.array.sentinel); |
| 835 | result->data.x_array.special = ConstArraySpecialNone; | 834 | result->data.x_array.special = ConstArraySpecialNone; |
| 836 | result->data.x_array.data.s_none.elements = &array_val->data.x_array.data.s_none.elements[elem_index]; | 835 | result->data.x_array.data.s_none.elements = &array_val->data.x_array.data.s_none.elements[elem_index]; |
| 837 | result->parent.id = ConstParentIdArray; | 836 | result->parent.id = ConstParentIdArray; |