mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 21:08:36 +00:00
parent
f4519c520a
commit
47fcbfdc51
@ -30,6 +30,7 @@ comptime {
|
||||
_ = @import("behavior/bugs/2114.zig");
|
||||
_ = @import("behavior/bugs/2346.zig");
|
||||
_ = @import("behavior/bugs/2578.zig");
|
||||
_ = @import("behavior/bugs/3112.zig");
|
||||
_ = @import("behavior/bugs/394.zig");
|
||||
_ = @import("behavior/bugs/421.zig");
|
||||
_ = @import("behavior/bugs/529.zig");
|
||||
|
||||
17
test/stage1/behavior/bugs/3112.zig
Normal file
17
test/stage1/behavior/bugs/3112.zig
Normal file
@ -0,0 +1,17 @@
|
||||
const std = @import("std");
|
||||
const expect = std.testing.expect;
|
||||
|
||||
const State = struct {
|
||||
const Self = @This();
|
||||
enter: fn (previous: ?Self) void,
|
||||
};
|
||||
|
||||
fn prev(p: ?State) void {
|
||||
expect(p == null);
|
||||
}
|
||||
|
||||
test "zig test crash" {
|
||||
var global: State = undefined;
|
||||
global.enter = prev;
|
||||
global.enter(null);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user