zig/test/behavior/bugs/12984.zig
Jacob Young f95faac5ae x86_64: (re)implement optional ops
Note that this commit also changes the layout of optional for all
other backends using `src/codegen.zig` without updating them!
2023-03-21 08:49:54 +01:00

21 lines
583 B
Zig

const std = @import("std");
const builtin = @import("builtin");
pub fn DeleagateWithContext(comptime Function: type) type {
const ArgArgs = std.meta.ArgsTuple(Function);
return struct {
t: ArgArgs,
};
}
pub const OnConfirm = DeleagateWithContext(fn (bool) void);
pub const CustomDraw = DeleagateWithContext(fn (?OnConfirm) void);
test "simple test" {
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
var c: CustomDraw = undefined;
_ = c;
}