mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 23:22:44 +00:00
9 lines
161 B
Zig
9 lines
161 B
Zig
test "integer cast panic" {
|
|
var a: u16 = 0xabcd; // runtime-known
|
|
_ = &a;
|
|
const b: u8 = @intCast(a);
|
|
_ = b;
|
|
}
|
|
|
|
// test_error=cast truncated bits
|