aboutsummaryrefslogtreecommitdiff
path: root/doc/langref/test_while_nested_break.zig
blob: 8c6cac8180bf556e8a88c5af035eec95cbc08328 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
test "nested break" {
    outer: while (true) {
        while (true) {
            break :outer;
        }
    }
}

test "nested continue" {
    var i: usize = 0;
    outer: while (i < 10) : (i += 1) {
        while (true) {
            continue :outer;
        }
    }
}

// test