zig/doc/langref/test_comptime_division_by_zero.zig

9 lines
121 B
Zig
Raw Normal View History

comptime {
const a: i32 = 1;
const b: i32 = 0;
const c = a / b;
_ = c;
}
// test_error=division by zero