aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/comptime_continue_inside_runtime_catch.zig
blob: 9e62420f1f3329118ca97597b4f0ee36eb26223b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
export fn entry() void {
    const ints = [_]u8{ 1, 2 };
    inline for (ints) |_| {
        bad() catch continue;
    }
}
fn bad() !void {
    return error.Bad;
}

// error
// backend=stage2
// target=native
//
// :4:21: error: comptime control flow inside runtime block
// :4:15: note: runtime control flow here