zig/test/cases/compile_errors/div_overflow.zig
2023-01-09 13:52:37 -07: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'