aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/ignored_deferred_function_call.zig
blob: 9537255d33041ae1ae7a4822bf84a5a8a25bf79b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
export fn foo() void {
    defer bar();
}
fn bar() anyerror!i32 {
    return 0;
}

// error
// backend=stage2
// target=native
//
// :2:14: error: error is ignored
// :2:14: note: consider using 'try', 'catch', or 'if'