mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
Fix rendering of empty arrays
This commit is contained in:
parent
327d40e7a3
commit
55304128c0
@ -6937,9 +6937,9 @@ static void render_const_val_array(CodeGen *g, Buf *buf, Buf *type_name, ZigValu
|
||||
return;
|
||||
}
|
||||
case ConstArraySpecialNone: {
|
||||
ZigValue *base = &array->data.s_none.elements[start];
|
||||
assert(base != nullptr);
|
||||
assert(start + len <= const_val->type->data.array.len);
|
||||
ZigValue *base = &array->data.s_none.elements[start];
|
||||
assert(len == 0 || base != nullptr);
|
||||
|
||||
buf_appendf(buf, "%s{", buf_ptr(type_name));
|
||||
for (uint64_t i = 0; i < len; i += 1) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user