Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly include try-catch-statements even if they have already been (#…
…2898) included via another means
- Loading branch information
1 parent
6f9c3b5
commit 71f2fa8
Showing
4 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
test/form/samples/try-statement-deoptimization/include-via-outside-variable/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
description: 'works when the try-statement is included via an outside variable' | ||
}; |
6 changes: 6 additions & 0 deletions
6
test/form/samples/try-statement-deoptimization/include-via-outside-variable/_expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
console.log(myVar); | ||
|
||
try { | ||
var myVar = 3; | ||
console.log(myVar); | ||
} catch {} |
6 changes: 6 additions & 0 deletions
6
test/form/samples/try-statement-deoptimization/include-via-outside-variable/main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
console.log(myVar); | ||
|
||
try { | ||
var myVar = 3; | ||
console.log(myVar); | ||
} catch {} |