Merge pull request #7246 from Microsoft/noImplicitReturnsWithProtectedBlocks

properly set reachable state after protected try\finally block
This commit is contained in:
Vladimir Matveev
2016-02-25 15:03:44 -08:00
11 changed files with 192 additions and 1 deletions

View File

@@ -685,7 +685,7 @@ namespace ts {
// post catch/finally state is reachable if
// - post try state is reachable - control flow can fall out of try block
// - post catch state is reachable - control flow can fall out of catch block
currentReachabilityState = or(postTryState, postCatchState);
currentReachabilityState = n.catchClause ? or(postTryState, postCatchState) : postTryState;
}
function bindSwitchStatement(n: SwitchStatement): void {