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 {
672
672
bindJSDoc ( node ) ;
673
673
return ;
674
674
}
675
- if ( node . kind >= SyntaxKind . FirstStatement && node . kind <= SyntaxKind . LastStatement ) {
675
+ if ( node . kind >= SyntaxKind . FirstStatement && node . kind <= SyntaxKind . LastStatement && ! options . allowUnreachableCode ) {
676
676
node . flowNode = currentFlow ;
677
677
}
678
678
switch ( node . kind ) {
Original file line number Diff line number Diff line change @@ -30539,8 +30539,7 @@ namespace ts {
30539
30539
cancellationToken.throwIfCancellationRequested();
30540
30540
}
30541
30541
}
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)) {
30544
30543
errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected);
30545
30544
}
30546
30545
You can’t perform that action at this time.
0 commit comments