diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-03-19 13:36:16 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-03-19 13:36:16 +0200 |
| commit | 27572373325b22b06767bc42cb7e270bf619f0a9 (patch) | |
| tree | 9329be499d9d3d81da86d7b7e52a33ee6c925b80 /test/behavior/basic.zig | |
| parent | ad5770eba40e0cc425c7a1eab4d37c6f9788d670 (diff) | |
| download | zig-27572373325b22b06767bc42cb7e270bf619f0a9.tar.gz zig-27572373325b22b06767bc42cb7e270bf619f0a9.zip | |
Sema: add error for runtime block peer type being comptime only
Diffstat (limited to 'test/behavior/basic.zig')
| -rw-r--r-- | test/behavior/basic.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/behavior/basic.zig b/test/behavior/basic.zig index 43967ee0e5..bee68d675c 100644 --- a/test/behavior/basic.zig +++ b/test/behavior/basic.zig @@ -331,6 +331,7 @@ fn copy(src: *const u64, dst: *u64) void { } test "call result of if else expression" { + if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 has different function pointers if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; @@ -341,7 +342,7 @@ test "call result of if else expression" { try expect(mem.eql(u8, f2(false), "b")); } fn f2(x: bool) []const u8 { - return (if (x) fA else fB)(); + return (if (x) &fA else &fB)(); } test "memcpy and memset intrinsics" { |
