blob: 75f2747eda3dd9b54af050319046891b9863396b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
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;
}
|