zig/test/cases/compile_errors/div_overflow.zig
2022-11-04 23:13:29 +02:00

12 lines
182 B
Zig

comptime {
const a = -128;
const b: i8 = -1;
_ = a / b;
}
// error
// backend=stage2
// target=native
//
// :4:11: error: overflow of integer type 'i8' with value '128'