aboutsummaryrefslogtreecommitdiff
path: root/test/input
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-03-01 05:04:21 +0000
committerGitHub <noreply@github.com>2020-03-01 05:04:21 +0000
commit348547286611eaf665b00d5ee21a8fee2c2f0660 (patch)
tree0dc1828a7e8aa29299c43c626477bf44d360dea0 /test/input
parentc8d60d698310aa263c4f6684b18680af07e07c87 (diff)
downloadtracifyjs-348547286611eaf665b00d5ee21a8fee2c2f0660.tar.gz
tracifyjs-348547286611eaf665b00d5ee21a8fee2c2f0660.zip
avoid reducing setter argument (#3737)
Diffstat (limited to 'test/input')
-rw-r--r--test/input/reduce/setter.js8
-rw-r--r--test/input/reduce/setter.reduced.js19
2 files changed, 27 insertions, 0 deletions
diff --git a/test/input/reduce/setter.js b/test/input/reduce/setter.js
new file mode 100644
index 00000000..87228bc4
--- /dev/null
+++ b/test/input/reduce/setter.js
@@ -0,0 +1,8 @@
+console.log(function f(a) {
+ ({
+ set p(v) {
+ f++;
+ }
+ });
+ return f.length;
+}());
diff --git a/test/input/reduce/setter.reduced.js b/test/input/reduce/setter.reduced.js
new file mode 100644
index 00000000..d947226f
--- /dev/null
+++ b/test/input/reduce/setter.reduced.js
@@ -0,0 +1,19 @@
+console.log(function f(a) {
+ ({
+ set p(v) {
+ f++;
+ }
+ });
+ return f.length;
+}());
+// output: 1
+//
+// minify: 0
+//
+// options: {
+// "compress": {
+// "keep_fargs": false,
+// "unsafe": true
+// },
+// "mangle": false
+// } \ No newline at end of file