diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-07-28 15:00:40 +0300 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-08-01 23:37:01 +0300 |
| commit | 57f9405a8fcaec6043d680fa47ae0e98709160c2 (patch) | |
| tree | 40614ac1850186954c45c91f169d60a4df2bdb2b /test/behavior | |
| parent | e7b6a1833106a5d808e4e82a2d61abf417aff407 (diff) | |
| download | zig-57f9405a8fcaec6043d680fa47ae0e98709160c2.tar.gz zig-57f9405a8fcaec6043d680fa47ae0e98709160c2.zip | |
Sema: validate bitcast operand type
Diffstat (limited to 'test/behavior')
| -rw-r--r-- | test/behavior/bitcast.zig | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/test/behavior/bitcast.zig b/test/behavior/bitcast.zig index b0c66fd92b..27a0692a44 100644 --- a/test/behavior/bitcast.zig +++ b/test/behavior/bitcast.zig @@ -90,22 +90,6 @@ test "nested bitcast" { comptime try S.foo(42); } -test "@bitCast enum to its integer type" { - const SOCK = enum(c_int) { - A, - B, - - fn testBitCastExternEnum() !void { - var SOCK_DGRAM = @This().B; - var sock_dgram = @bitCast(c_int, SOCK_DGRAM); - try expect(sock_dgram == 1); - } - }; - - try SOCK.testBitCastExternEnum(); - comptime try SOCK.testBitCastExternEnum(); -} - // issue #3010: compiler segfault test "bitcast literal [4]u8 param to u32" { const ip = @bitCast(u32, [_]u8{ 255, 255, 255, 255 }); |
