zig/doc/langref/test_comptime_shlExact_overwlow.zig

7 lines
114 B
Zig

comptime {
const x = @shlExact(@as(u8, 0b01010101), 2);
_ = x;
}
// test_error=operation caused overflow