15 lines
261 B
Zig
15 lines
261 B
Zig
|
fn continueInForLoop() {
|
||
|
@setFnTest(this);
|
||
|
|
||
|
const array = []i32 {1, 2, 3, 4, 5};
|
||
|
var sum : i32 = 0;
|
||
|
for (array) |x| {
|
||
|
sum += x;
|
||
|
if (x < 3) {
|
||
|
continue;
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
if (sum != 6) @unreachable()
|
||
|
}
|