Closed CountBleck closed 6 months ago
@HerrCai0907 I don't think that's possible to do unless I have an assert
in the incrementor. This should likely work just fine.
Like
function inc(i: i32): i32 {
assert(i != 100); // failed
return i + 1;
}
export function _start(): void {
for (let i = 0; i < 1; i = inc(i)) {
let i = 100;
}
}
Fixes #2825.
Changes proposed in this pull request: ⯈ Compile for-loop incrementors within the initializer's flow