Open SrMordred opened 3 years ago
windows-x64 zig version 0.9.0-dev.476+3e67ef5c9
windows-x64
zig version 0.9.0-dev.476+3e67ef5c9
const T = struct { v: i32, pub fn f1(self: *@This()) void { self.v += 1; } }; pub fn main() anyerror!void { comptime var r = T{ .v = 0 }; _ = r.f1();
calling f1: Segmentation fault at address 0x7ff60c010cd8 D:\programming\zig\tests\src\main.zig:148:16: 0x7ff60bfeef0b in T::T.f1 (tests.obj) self.v += 1;
f1
Segmentation fault at address 0x7ff60c010cd8 D:\programming\zig\tests\src\main.zig:148:16: 0x7ff60bfeef0b in T::T.f1 (tests.obj) self.v += 1;
Well it is a compiler bug, but not a segfault. The bug is that it didn't prevent this from being compiled.
windows-x64
zig version 0.9.0-dev.476+3e67ef5c9
calling
f1
:Segmentation fault at address 0x7ff60c010cd8 D:\programming\zig\tests\src\main.zig:148:16: 0x7ff60bfeef0b in T::T.f1 (tests.obj) self.v += 1;