@@ -2410,9 +2410,9 @@ export class Compiler extends DiagnosticEmitter {
24102410 flow . inherit ( condFlow ) ;
24112411
24122412 // Detect if local flags are incompatible before and after looping, and
2413- // if so recompile by unifying local flags between iterations.
2413+ // if so recompile by unifying local flags between iterations. Note that
2414+ // this may be necessary multiple times where locals depend on each other.
24142415 if ( Flow . hasIncompatibleLocalStates ( flowBefore , flow ) ) {
2415- assert ( ! flowAfter ) ; // should work on the first attempt
24162416 outerFlow . popBreakLabel ( ) ;
24172417 this . currentFlow = outerFlow ;
24182418 return this . doCompileDoStatement ( statement , flow ) ;
@@ -2603,9 +2603,9 @@ export class Compiler extends DiagnosticEmitter {
26032603 ) ;
26042604
26052605 // Detect if local flags are incompatible before and after looping, and if
2606- // so recompile by unifying local flags between iterations.
2606+ // so recompile by unifying local flags between iterations. Note that this
2607+ // may be necessary multiple times where locals depend on each other.
26072608 if ( Flow . hasIncompatibleLocalStates ( flowBefore , flow ) ) {
2608- assert ( ! flowAfter ) ; // should work on the first attempt
26092609 assert ( ! bodyFlow . hasScopedLocals ) ;
26102610 flow . freeScopedLocals ( ) ;
26112611 outerFlow . popBreakLabel ( ) ;
@@ -3344,10 +3344,10 @@ export class Compiler extends DiagnosticEmitter {
33443344 else flow . inheritBranch ( bodyFlow ) ;
33453345
33463346 // Detect if local flags are incompatible before and after looping, and
3347- // if so recompile by unifying local flags between iterations.
3347+ // if so recompile by unifying local flags between iterations. Note that
3348+ // this may be necessary multiple times where locals depend on each other.
33483349 // Here: Only relevant if flow does not always break.
33493350 if ( ! breaks && Flow . hasIncompatibleLocalStates ( flowBefore , flow ) ) {
3350- assert ( ! flowAfter ) ; // should work on the first attempt
33513351 flow . freeTempLocal ( tcond ) ;
33523352 outerFlow . popBreakLabel ( ) ;
33533353 this . currentFlow = outerFlow ;
0 commit comments