Zig Version
0.14.0-dev.2909+f3c29dcb2
Steps to Reproduce and Observed Behavior
Create a new zig project using zig init and replace the main.zig file with the following:
const G = struct {
const L = struct { [:0]const u8 };
comptime list: []*L = &.{},
pub fn get(comptime self: *G, pattern: [:0]const u8) void {
comptime {
var temp: L = .{pattern};
self.list = self.list ++ @constCast(.{&temp});
}
}
};
pub fn main() !void {
comptime {
var t = G{};
t.get("s");
}
}
What is observed is that the compiler simply quits with code 1 and doesn't give any information on what the issue is.
We have also ran the code with a debug build and it does give us an error, im appending the output bellow.
Crash.log
Expected Behavior
I would expect to get an error message for why it fails to compile, the code is most likely not valid zig but as a new person in the zig ecosystem it's fairly hard to find out what's wrong when there is no output.
Zig Version
0.14.0-dev.2909+f3c29dcb2
Steps to Reproduce and Observed Behavior
Create a new zig project using
zig initand replace themain.zigfile with the following:What is observed is that the compiler simply quits with code 1 and doesn't give any information on what the issue is.
We have also ran the code with a debug build and it does give us an error, im appending the output bellow.
Crash.log
Expected Behavior
I would expect to get an error message for why it fails to compile, the code is most likely not valid zig but as a new person in the zig ecosystem it's fairly hard to find out what's wrong when there is no output.