aboutsummaryrefslogtreecommitdiff
path: root/test/compress/ie8.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-06-15 01:29:01 +0800
committerGitHub <noreply@github.com>2020-06-15 01:29:01 +0800
commit8b2cfd45fa8dd4f01d9535ad43bc37ce4953e78d (patch)
tree81da2985dbaa0af9fa0056b5287081fe961842ae /test/compress/ie8.js
parentae9f56be109ccc27003868e997143823957f874d (diff)
downloadtracifyjs-8b2cfd45fa8dd4f01d9535ad43bc37ce4953e78d.tar.gz
tracifyjs-8b2cfd45fa8dd4f01d9535ad43bc37ce4953e78d.zip
fix corner case in `rename` (#4000)
fixes #3999
Diffstat (limited to 'test/compress/ie8.js')
-rw-r--r--test/compress/ie8.js41
1 files changed, 39 insertions, 2 deletions
diff --git a/test/compress/ie8.js b/test/compress/ie8.js
index e11e3651..c0049766 100644
--- a/test/compress/ie8.js
+++ b/test/compress/ie8.js
@@ -2223,13 +2223,13 @@ issue_3523_rename_ie8: {
expect: {
var a = 0, b, c = "FAIL";
(function() {
- var c, n, t, o, a, r, f, i, u, e, h, l, v, y;
+ var c, n, t, o, a, r, e, f, i, u, h, l, v, y;
})();
try {
throw 0;
} catch (e) {
(function() {
- (function n() {
+ (function e() {
c = "PASS";
})();
})();
@@ -2522,3 +2522,40 @@ issue_3918: {
}
expect_stdout: "PASS"
}
+
+issue_3999: {
+ rename = true
+ mangle = {
+ ie8: true,
+ }
+ input: {
+ (function() {
+ (function f() {
+ for (var i = 0; i < 2; i++)
+ try {
+ f[0];
+ } catch (f) {
+ var f = 0;
+ console.log(i);
+ }
+ })();
+ })(typeof f);
+ }
+ expect: {
+ (function() {
+ (function f() {
+ for (var c = 0; c < 2; c++)
+ try {
+ f[0];
+ } catch (f) {
+ var f = 0;
+ console.log(c);
+ }
+ })();
+ })(typeof f);
+ }
+ expect_stdout: [
+ "0",
+ "1",
+ ]
+}