You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Completely removed, as no errors can be thrown (should also be removed with tryCatchDeoptimization=true).
Note that if a finally block exists, it must be preserved (without the finally keyword).
Actual Behavior
try {
}
catch (e) {
console.log();
}
The text was updated successfully, but these errors were encountered:
stephanedr
changed the title
Try/catch structure should be removed when try block is empty
Try/catch structure should be tree-shaken when try block is empty
Oct 15, 2019
Good point, as it turns out, there is never a reason to look for side-effects in the catch block when determining if the try-statement as a whole has side-effects. Improved in #3166.
How Do We Reproduce?
With
tryCatchDeoptimization=false
.Expected Behavior
Completely removed, as no errors can be thrown (should also be removed with
tryCatchDeoptimization=true
).Note that if a
finally
block exists, it must be preserved (without thefinally
keyword).Actual Behavior
The text was updated successfully, but these errors were encountered: