File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -397,6 +397,7 @@ export class Compiler extends DiagnosticEmitter {
397397
398398 /** Program reference. */
399399 program : Program ;
400+ static breakingFlowAlternatives : Flow ;
400401 /** Module instance being compiled. */
401402 get module ( ) : Module { return this . program . module ; }
402403 /** Provided options. */
@@ -2831,7 +2832,10 @@ export class Compiler extends DiagnosticEmitter {
28312832 // Combine all alternatives that merge again with outer flow
28322833 if ( possiblyBreaks || ( isLast && possiblyFallsThrough ) ) {
28332834 if ( breakingFlowAlternatives ) breakingFlowAlternatives . inheritAlternatives ( breakingFlowAlternatives , innerFlow ) ;
2834- else breakingFlowAlternatives = innerFlow ;
2835+ else {
2836+ breakingFlowAlternatives = innerFlow ;
2837+ Compiler . breakingFlowAlternatives = breakingFlowAlternatives ;
2838+ }
28352839
28362840 // Otherwise just merge the effects of a non-merging branch
28372841 } else if ( ! possiblyFallsThrough ) {
You can’t perform that action at this time.
0 commit comments