aboutsummaryrefslogtreecommitdiff
path: root/test/cases/simple_if_statement.zig
blob: 9b711309bfcccecc7cfe776b070e965e6baa8b11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
fn add(a: i32, b: i32) i32 {
    return a + b;
}

fn assert(ok: bool) void {
    if (!ok) unreachable;
}

pub fn main() void {
    assert(add(1, 2) == 3);
}

// run
// backend=selfhosted,llvm
// target=x86_64-linux,x86_64-macos
//