mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-05-07 17:11:19 -04:00
20 lines
324 B
Zig
20 lines
324 B
Zig
comptime {
|
|
const x = switch (true) {
|
|
true => false,
|
|
};
|
|
_ = x;
|
|
}
|
|
comptime {
|
|
const x = switch (true) {
|
|
false => true,
|
|
};
|
|
_ = x;
|
|
}
|
|
|
|
// error
|
|
// backend=stage2
|
|
// target=native
|
|
//
|
|
// :2:15: error: switch must handle all possibilities
|
|
// :8:15: error: switch must handle all possibilities
|