zig/doc/langref/test_while_nested_break.zig

19 lines
281 B
Zig
Raw Normal View History

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