zig/test/cases/orelse_at_comptime.0.zig

12 lines
166 B
Zig

pub fn main() void {
const i: ?u64 = 0;
const result = i orelse 5;
assert(result == 0);
}
fn assert(b: bool) void {
if (!b) unreachable;
}
// run
//