mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 16:12:33 +00:00
12 lines
179 B
Zig
12 lines
179 B
Zig
|
pub fn main() void {
|
||
|
const i: anyerror!u64 = error.B;
|
||
|
const caught = i catch 5;
|
||
|
assert(caught == 5);
|
||
|
}
|
||
|
fn assert(b: bool) void {
|
||
|
if (!b) unreachable;
|
||
|
}
|
||
|
|
||
|
// run
|
||
|
//
|