mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Merge pull request #7246 from Microsoft/noImplicitReturnsWithProtectedBlocks
properly set reachable state after protected try\finally block
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user