aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVallahor <vallahor91@gmail.com>2022-05-29 06:08:30 -0300
committerAndrew Kelley <andrew@ziglang.org>2022-07-19 19:10:12 -0700
commitd5d27f245b63b4b516db09feb334e4f548c89b1b (patch)
treee08e945b756e400b4183f945cf354501cd68ca96 /src
parent1213123ad04e90d67b5c004ddc8744fe409cd839 (diff)
downloadzig-d5d27f245b63b4b516db09feb334e4f548c89b1b.tar.gz
zig-d5d27f245b63b4b516db09feb334e4f548c89b1b.zip
issue: reminder to fix array_init
Diffstat (limited to 'src')
-rw-r--r--src/Autodoc.zig8
1 files changed, 8 insertions, 0 deletions
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,