File tree 1 file changed +5
-1
lines changed
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 {
397
397
398
398
/** Program reference. */
399
399
program : Program ;
400
+ static breakingFlowAlternatives : Flow | null = null ;
400
401
/** Module instance being compiled. */
401
402
get module ( ) : Module { return this . program . module ; }
402
403
/** Provided options. */
@@ -2831,7 +2832,10 @@ export class Compiler extends DiagnosticEmitter {
2831
2832
// Combine all alternatives that merge again with outer flow
2832
2833
if ( possiblyBreaks || ( isLast && possiblyFallsThrough ) ) {
2833
2834
if ( breakingFlowAlternatives ) breakingFlowAlternatives . inheritAlternatives ( breakingFlowAlternatives , innerFlow ) ;
2834
- else breakingFlowAlternatives = innerFlow ;
2835
+ else {
2836
+ breakingFlowAlternatives = innerFlow ;
2837
+ Compiler . breakingFlowAlternatives = breakingFlowAlternatives ;
2838
+ }
2835
2839
2836
2840
// Otherwise just merge the effects of a non-merging branch
2837
2841
} else if ( ! possiblyFallsThrough ) {
You can’t perform that action at this time.
0 commit comments