aboutsummaryrefslogtreecommitdiff
path: root/test/cases/assert_function.18.zig
blob: ac0f97c40f89e0ee57080acffd03d5ecb51ac79d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const builtin = @import("builtin");

extern "c" fn write(c_int, usize, usize) usize;

pub fn main() void {
    for ("hello") |_| print();
}

fn print() void {
    _ = write(1, @intFromPtr("hello\n"), 6);
}

// run
//
// hello
// hello
// hello
// hello
// hello
//