authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-01-23 00:46:44-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-01-23 00:46:44-05:00
log1a08c0d40b8c6e72532762281365a5105116dc00
treefb78f50ec2ce94eb5e72b18b8b85273795b95304
parent396d57c498278a39d069842321fcdaac90babf02
signature Commit is signed but in an unrecognized format.

new test case


1 files changed, 9 insertions(+), 0 deletions(-)

test/stage1/behavior/bitcast.zig+9
...@@ -167,3 +167,12 @@ test "nested bitcast" {...@@ -167,3 +167,12 @@ test "nested bitcast" {
167 S.foo(42);167 S.foo(42);
168 comptime S.foo(42);168 comptime S.foo(42);
169}169}
170
171test "bitcast passed as tuple element" {
172 const S = struct {
173 fn foo(args: var) void {
174 expect(args[0] == 1.00000e-09);
175 }
176 };
177 S.foo(.{@bitCast(f32, @as(u32, 814313563))});
178}