| author | |
| committer | |
| log | 47fcbfdc51bcb9c9d518a76b8eee122833893660 |
| tree | 3081fcc5c234f17d58cf13bb6da279415d4c532a |
| parent | f4519c520a81439e524428258ad5aa441c9b0687 |
| signature |
closes #31122 files changed, 18 insertions(+), 0 deletions(-)
test/stage1/behavior.zig+1| ... | ... | @@ -30,6 +30,7 @@ comptime { |
| 30 | 30 | _ = @import("behavior/bugs/2114.zig"); |
| 31 | 31 | _ = @import("behavior/bugs/2346.zig"); |
| 32 | 32 | _ = @import("behavior/bugs/2578.zig"); |
| 33 | _ = @import("behavior/bugs/3112.zig"); | |
| 33 | 34 | _ = @import("behavior/bugs/394.zig"); |
| 34 | 35 | _ = @import("behavior/bugs/421.zig"); |
| 35 | 36 | _ = @import("behavior/bugs/529.zig"); |
test/stage1/behavior/bugs/3112.zig created+17| ... | ... | @@ -0,0 +1,17 @@ |
| 1 | const std = @import("std"); | |
| 2 | const expect = std.testing.expect; | |
| 3 | ||
| 4 | const State = struct { | |
| 5 | const Self = @This(); | |
| 6 | enter: fn (previous: ?Self) void, | |
| 7 | }; | |
| 8 | ||
| 9 | fn prev(p: ?State) void { | |
| 10 | expect(p == null); | |
| 11 | } | |
| 12 | ||
| 13 | test "zig test crash" { | |
| 14 | var global: State = undefined; | |
| 15 | global.enter = prev; | |
| 16 | global.enter(null); | |
| 17 | } |