aboutsummaryrefslogtreecommitdiff
path: root/test/compress/functions.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-01-04 23:38:37 +0800
committerGitHub <noreply@github.com>2018-01-04 23:38:37 +0800
commit484e484571448595389e4c6fd9559e47c5591f7a (patch)
treee10f973cee6db467c6f1177bf7b1d4d7adfacd9b /test/compress/functions.js
parent6f3f21233f61fbb014f5e5029baa1e4a8a91e0e7 (diff)
downloadtracifyjs-484e484571448595389e4c6fd9559e47c5591f7a.tar.gz
tracifyjs-484e484571448595389e4c6fd9559e47c5591f7a.zip
fix corner case in `inline` (#2720)
Diffstat (limited to 'test/compress/functions.js')
-rw-r--r--test/compress/functions.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js
index 5b0c49b8..f4662082 100644
--- a/test/compress/functions.js
+++ b/test/compress/functions.js
@@ -1887,3 +1887,21 @@ use_before_init_in_loop: {
}
expect_stdout: "PASS"
}
+
+duplicate_arg_var: {
+ options = {
+ inline: true,
+ toplevel: true,
+ }
+ input: {
+ console.log(function(b) {
+ return b;
+ var b;
+ }("PASS"));
+ }
+ expect: {
+ console.log((b = "PASS", b));
+ var b;
+ }
+ expect_stdout: "PASS"
+}