We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2730ce commit a8a8826Copy full SHA for a8a8826
1 file changed
src/compiler/binder.ts
@@ -551,6 +551,9 @@ namespace ts {
551
case SyntaxKind.CaseBlock:
552
bindCaseBlock(<CaseBlock>node);
553
break;
554
+ case SyntaxKind.CaseClause:
555
+ bindCaseClause(<CaseClause>node);
556
+ break;
557
case SyntaxKind.LabeledStatement:
558
bindLabeledStatement(<LabeledStatement>node);
559
@@ -989,6 +992,14 @@ namespace ts {
989
992
}
990
993
991
994
995
+ function bindCaseClause(node: CaseClause): void {
996
+ const saveCurrentFlow = currentFlow;
997
+ currentFlow = preSwitchCaseFlow;
998
+ bind(node.expression);
999
+ currentFlow = saveCurrentFlow;
1000
+ forEach(node.statements, bind);
1001
+ }
1002
+
1003
function pushActiveLabel(name: string, breakTarget: FlowLabel, continueTarget: FlowLabel): ActiveLabel {
1004
const activeLabel = {
1005
name,
0 commit comments