aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/combination_of_nosuspend_and_async.zig
blob: dd853432b6e8f0c862ee1ee3e6de37464244edd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export fn entry() void {
    nosuspend {
        const bar = async foo();
        suspend {}
        resume bar;
    }
}
fn foo() void {}

// error
// backend=stage2
// target=native
//
// :4:9: error: suspend inside nosuspend block
// :2:5: note: nosuspend block here