Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
test
cases
compile_errors
compile-time_division_by_zero.zig
pretty
plain
permalink
blame
history
•
10 lines
•
165 B
1
comptime {
2
const a: i32 = 1;
3
const b: i32 = 0;
4
const c = a / b;
5
_ = c;
6
}
7
8
// error
9
//
10
// :4:19: error: division by zero here causes illegal behavior