File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -672,7 +672,7 @@ namespace ts {
672672 bindJSDoc ( node ) ;
673673 return ;
674674 }
675- if ( node . kind >= SyntaxKind . FirstStatement && node . kind <= SyntaxKind . LastStatement ) {
675+ if ( node . kind >= SyntaxKind . FirstStatement && node . kind <= SyntaxKind . LastStatement && ! options . allowUnreachableCode ) {
676676 node . flowNode = currentFlow ;
677677 }
678678 switch ( node . kind ) {
Original file line number Diff line number Diff line change @@ -30539,8 +30539,7 @@ namespace ts {
3053930539 cancellationToken.throwIfCancellationRequested();
3054030540 }
3054130541 }
30542- if (kind >= SyntaxKind.FirstStatement && kind <= SyntaxKind.LastStatement &&
30543- !compilerOptions.allowUnreachableCode && node.flowNode && !isReachableFlowNode(node.flowNode)) {
30542+ if (kind >= SyntaxKind.FirstStatement && kind <= SyntaxKind.LastStatement && node.flowNode && !isReachableFlowNode(node.flowNode)) {
3054430543 errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected);
3054530544 }
3054630545
You can’t perform that action at this time.
0 commit comments