aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/let.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/compress/let.js b/test/compress/let.js
index c59308c4..4df5bb01 100644
--- a/test/compress/let.js
+++ b/test/compress/let.js
@@ -20,6 +20,39 @@ retain_block: {
node_version: ">=4"
}
+retain_assignment: {
+ options = {
+ dead_code: true,
+ reduce_vars: true,
+ }
+ input: {
+ "use strict";
+ function f() {
+ return a = 0;
+ let a;
+ }
+ try {
+ f();
+ } catch (e) {
+ console.log("PASS");
+ }
+ }
+ expect: {
+ "use strict";
+ function f() {
+ return a = 0;
+ let a;
+ }
+ try {
+ f();
+ } catch (e) {
+ console.log("PASS");
+ }
+ }
+ expect_stdout: "PASS"
+ node_version: ">=4"
+}
+
retain_catch: {
options = {
dead_code: true,
@@ -897,6 +930,7 @@ issue_4210: {
issue_4212_1: {
options = {
dead_code: true,
+ reduce_vars: true,
}
input: {
"use strict";