From d5d27f245b63b4b516db09feb334e4f548c89b1b Mon Sep 17 00:00:00 2001 From: Vallahor Date: Sun, 29 May 2022 06:08:30 -0300 Subject: [PATCH] issue: reminder to fix array_init --- src/Autodoc.zig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Autodoc.zig b/src/Autodoc.zig index d29a468b91..b56115372a 100644 --- a/src/Autodoc.zig +++ b/src/Autodoc.zig @@ -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,