You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will be an infinite loop if the block is part of a loop of blocks (which is the case with infinite loops) and each block in that loop has zero elements (as it is the case for an empty for loop with no condition and no update expression).
The reason why this happens only when an initializer is present is because in ControlFlowGraphBuilder.visitForStatement when both the initializer, the condition, and the loop body are empty, we add the for keyword as an element in the loop body block, thus accidentally avoiding the infinite loop.
if (tree.init() != null) {
buildExpression(tree.init());
} else if (tree.condition() == null && loopBodyBlock.elements().isEmpty()) {
loopBodyBlock.addElement(tree.forKeyword());
}
We probably need to make this second part more coherent along with the actual fix in JsCfgBlock.
The text was updated successfully, but these errors were encountered: