Skip to content

Commit a15436c

Browse files
committed
Properly analyze switch statement bypass control flow
1 parent aa39080 commit a15436c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19333,7 +19333,7 @@ namespace ts {
1933319333
}
1933419334
}
1933519335
if (bypassFlow) {
19336-
const flowType = getTypeAtFlowNode(bypassFlow.antecedent);
19336+
const flowType = getTypeAtFlowNode(bypassFlow);
1933719337
const type = getTypeFromFlowType(flowType);
1933819338
// If the bypass flow contributes a type we haven't seen yet and the switch statement
1933919339
// isn't exhaustive, process the bypass flow type. Since exhaustiveness checks increase

0 commit comments

Comments
 (0)