diff options
| author | Jacob G-W <jacoblevgw@gmail.com> | 2021-06-19 21:10:22 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-06-21 17:03:03 -0700 |
| commit | 9fffffb07b081858db0c2102a0680aa166b48263 (patch) | |
| tree | 36caed31c5b2aaa8e08bb8e6e90e9b2c30910ff3 /test/behavior/type.zig | |
| parent | b83b3883ba0b5e965f8f7f1298c77c6d766741af (diff) | |
| download | zig-9fffffb07b081858db0c2102a0680aa166b48263.tar.gz zig-9fffffb07b081858db0c2102a0680aa166b48263.zip | |
fix code broken from previous commit
Diffstat (limited to 'test/behavior/type.zig')
| -rw-r--r-- | test/behavior/type.zig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/behavior/type.zig b/test/behavior/type.zig index 44408a6d8e..fbd86f27cf 100644 --- a/test/behavior/type.zig +++ b/test/behavior/type.zig @@ -431,6 +431,10 @@ test "Type.Fn" { const foo = struct { fn func(a: usize, b: bool) align(4) callconv(.C) usize { + if (false) { + a; + b; + } return 0; } }.func; @@ -444,7 +448,9 @@ test "Type.BoundFn" { if (builtin.target.cpu.arch == .wasm32 or builtin.target.cpu.arch == .wasm64) return error.SkipZigTest; const TestStruct = packed struct { - pub fn foo(self: *const @This()) align(4) callconv(.Unspecified) void {} + pub fn foo(self: *const @This()) align(4) callconv(.Unspecified) void { + _ = self; + } }; const test_instance: TestStruct = undefined; try testing.expect(std.meta.eql( |
