authorgravatar for vallahor91@gmail.comVallahor <vallahor91@gmail.com> 2022-05-29 06:08:30-03:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-07-19 19:10:12-07:00
logd5d27f245b63b4b516db09feb334e4f548c89b1b
treee08e945b756e400b4183f945cf354501cd68ca96
parent1213123ad04e90d67b5c004ddc8744fe409cd839

issue: reminder to fix array_init


1 files changed, 8 insertions(+), 0 deletions(-)

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