aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-10-16 12:18:27 +0800
committerGitHub <noreply@github.com>2019-10-16 12:18:27 +0800
commit1549db70e60a1ae74f2b7ffc511ef123733f9557 (patch)
tree418015e8724ba48051aff3b9dfe0b4d5d15ca04b /test
parent8ff9a3c8fb89ac40fea0dd1cd249e8b94a690c2e (diff)
downloadtracifyjs-1549db70e60a1ae74f2b7ffc511ef123733f9557.tar.gz
tracifyjs-1549db70e60a1ae74f2b7ffc511ef123733f9557.zip
fix corner case in `ie8` (#3487)
fixes #3486
Diffstat (limited to 'test')
-rw-r--r--test/compress/ie8.js46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/compress/ie8.js b/test/compress/ie8.js
index c6b51d63..223da329 100644
--- a/test/compress/ie8.js
+++ b/test/compress/ie8.js
@@ -1841,3 +1841,49 @@ issue_3484_2_ie8_toplevel: {
}
expect_stdout: "number number"
}
+
+issue_3486: {
+ options = {
+ conditionals: true,
+ ie8: false,
+ reduce_vars: true,
+ }
+ input: {
+ (function a() {
+ (function a(a) {
+ console.log(a ? "FAIL" : "PASS");
+ })();
+ })();
+ }
+ expect: {
+ (function a() {
+ (function a(a) {
+ console.log(a ? "FAIL" : "PASS");
+ })();
+ })();
+ }
+ expect_stdout: "PASS"
+}
+
+issue_3486_ie8: {
+ options = {
+ conditionals: true,
+ ie8: true,
+ reduce_vars: true,
+ }
+ input: {
+ (function a() {
+ (function a(a) {
+ console.log(a ? "FAIL" : "PASS");
+ })();
+ })();
+ }
+ expect: {
+ (function a() {
+ (function a(a) {
+ console.log(a ? "FAIL" : "PASS");
+ })();
+ })();
+ }
+ expect_stdout: "PASS"
+}