aboutsummaryrefslogtreecommitdiff
path: root/test/cases/errors.0.zig
blob: 5e6940ac3e80e56fbcdd9ee84e45fe4d5862e6b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const std = @import("std");

pub fn main() void {
    foo() catch print();
}

fn foo() anyerror!void {}

fn print() void {
    _ = std.os.write(1, "Hello, World!\n") catch {};
}

// run
// target=x86_64-macos
//