aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/comptime_try_non_error.zig
blob: 935148414ccfd5e1d702066ac48a3f3a1e97170c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
comptime {
    foo();
}

fn foo() void {
    try bar();
}

pub fn bar() u8 {
    return 0;
}

// error
// backend=stage2
// target=native
//
// :6:12: error: expected error union type, found 'u8'
// :2:8: note: called from here