diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-09-29 19:02:59 +0300 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-09-30 00:46:45 +0300 |
| commit | 2a4e89e0c9428b1ca59bc23c7c1d667c8ddb2304 (patch) | |
| tree | 69c4313e5f326b0b7964fd5b66d5d485e4003a45 /test/behavior | |
| parent | 312260124279027a248d669e6096c3ab603fa188 (diff) | |
| download | zig-2a4e89e0c9428b1ca59bc23c7c1d667c8ddb2304.tar.gz zig-2a4e89e0c9428b1ca59bc23c7c1d667c8ddb2304.zip | |
Type: correctly handle ABI align strat for optionals and error unions
Closes #12984
Diffstat (limited to 'test/behavior')
| -rw-r--r-- | test/behavior/bugs/12984.zig | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/behavior/bugs/12984.zig b/test/behavior/bugs/12984.zig new file mode 100644 index 0000000000..a538b62e8d --- /dev/null +++ b/test/behavior/bugs/12984.zig @@ -0,0 +1,22 @@ +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 + if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO + + var c: CustomDraw = undefined; + _ = c; +} |
