mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 12:59:04 +00:00
new test case
This commit is contained in:
parent
396d57c498
commit
1a08c0d40b
@ -167,3 +167,12 @@ test "nested bitcast" {
|
||||
S.foo(42);
|
||||
comptime S.foo(42);
|
||||
}
|
||||
|
||||
test "bitcast passed as tuple element" {
|
||||
const S = struct {
|
||||
fn foo(args: var) void {
|
||||
expect(args[0] == 1.00000e-09);
|
||||
}
|
||||
};
|
||||
S.foo(.{@bitCast(f32, @as(u32, 814313563))});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user