aboutsummaryrefslogtreecommitdiff
path: root/test/compress/reduce_vars.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/reduce_vars.js')
-rw-r--r--test/compress/reduce_vars.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js
index a373de29..53e28152 100644
--- a/test/compress/reduce_vars.js
+++ b/test/compress/reduce_vars.js
@@ -1093,3 +1093,32 @@ func_modified: {
}
}
}
+
+defun_label: {
+ options = {
+ passes: 2,
+ reduce_vars: true,
+ unused: true,
+ }
+ input: {
+ !function() {
+ function f(a) {
+ L: {
+ if (a) break L;
+ return 1;
+ }
+ }
+ console.log(f(2));
+ }();
+ }
+ expect: {
+ !function() {
+ console.log(function(a) {
+ L: {
+ if (a) break L;
+ return 1;
+ }
+ }(2));
+ }();
+ }
+}