Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
test
cases
compile_errors
switch_expression-non_exhaustive_integer_prongs.zig
pretty
plain
permalink
blame
history
•
12 lines
•
192 B
1
fn foo(x: u8) void {
2
switch (x) {
3
0 => {},
4
}
5
}
6
export fn entry() usize {
7
return @sizeOf(@TypeOf(&foo));
8
}
9
10
// error
11
//
12
// :2:5: error: switch must handle all possibilities