[valueblocks] For.update is a proper value block

This commit is contained in:
Joe Savona committed 2023-01-31 13:39:39 -08:00
1 parent 6930b5f77e
commit 894eadfa67
6 files changed
+10 -13

No files matched your search

@@ -320,13 +320,10 @@ class Driver {
terminal.loc
).value;
const updateBlock = this.cx.ir.blocks.get(terminal.update)!;
const updateTerminal = updateBlock.terminal;
invariant(
updateTerminal.kind === "goto",
"Expected for loop update block to end in a goto"
);
const updateValue = this.visitValueBlock(blockValue, updateBlock);
const updateValue = this.visitValueBlockNew(
terminal.update,
terminal.loc
).value;
let loopBody: ReactiveBlock;
if (loopId) {