aboutsummaryrefslogtreecommitdiff
path: root/test/compress/dead-code.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/dead-code.js')
-rw-r--r--test/compress/dead-code.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/compress/dead-code.js b/test/compress/dead-code.js
index 68ee4b12..32bb88e6 100644
--- a/test/compress/dead-code.js
+++ b/test/compress/dead-code.js
@@ -881,3 +881,31 @@ issue_2692: {
}
expect_stdout: "function"
}
+
+issue_2701: {
+ options = {
+ dead_code: true,
+ inline: false,
+ }
+ input: {
+ function f(a) {
+ return a = function() {
+ return function() {
+ return a;
+ };
+ }();
+ }
+ console.log(typeof f()());
+ }
+ expect: {
+ function f(a) {
+ return a = function() {
+ return function() {
+ return a;
+ };
+ }();
+ }
+ console.log(typeof f()());
+ }
+ expect_stdout: "function"
+}