issue: reminder to fix array_init

This commit is contained in:
Vallahor 2022-05-29 06:08:30 -03:00 committed by Andrew Kelley
parent 1213123ad0
commit d5d27f245b

View File

@ -1788,6 +1788,14 @@ fn walkInstruction(
array_data[idx] = wr.expr.as.exprArg;
}
// @check
// not working with
// const value_slice_float = []f32{42.0};
// const value_slice_float2: []f32 = .{42.0};
// rendering [][]f32
// the reason for that is it's initialized as a pointer
// in this case getting the last type index works fine
// but when it's not after a pointer it's thrown an error in js.
const type_slot_index = self.types.items.len;
try self.types.append(self.arena, .{ .Pointer = .{
.size = .Slice,