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

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

pub fn bar() u8 {
    return 0;
}

// error
//
// :6:12: error: expected error union type, found 'u8'
// :6:12: note: consider omitting 'try'
// :2:8: note: called at comptime here