aboutsummaryrefslogtreecommitdiff
path: root/test/compress/const.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/const.js')
-rw-r--r--test/compress/const.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/compress/const.js b/test/compress/const.js
index 2f88975e..896e8c38 100644
--- a/test/compress/const.js
+++ b/test/compress/const.js
@@ -1104,3 +1104,34 @@ issue_4245: {
}
expect_stdout: true
}
+
+issue_4248: {
+ options = {
+ collapse_vars: true,
+ }
+ input: {
+ var a = "FAIL";
+ try {
+ (function() {
+ a = "PASS";
+ b[a];
+ const b = 0;
+ })();
+ } catch (e) {
+ console.log(a);
+ }
+ }
+ expect: {
+ var a = "FAIL";
+ try {
+ (function() {
+ a = "PASS";
+ b[a];
+ const b = 0;
+ })();
+ } catch (e) {
+ console.log(a);
+ }
+ }
+ expect_stdout: "PASS"
+}