aboutsummaryrefslogtreecommitdiff
path: root/test/compress/pure_getters.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-05-14 05:26:40 +0800
committerGitHub <noreply@github.com>2019-05-14 05:26:40 +0800
commitd538a732501f6654ce359ae3ee44a55a873c6a7d (patch)
treefbced456c1b877855bac7df483e4b341e06bdaaa /test/compress/pure_getters.js
parent2e4fbdeb08ea5a9b78285218fed8b968bdd32172 (diff)
downloadtracifyjs-d538a732501f6654ce359ae3ee44a55a873c6a7d.tar.gz
tracifyjs-d538a732501f6654ce359ae3ee44a55a873c6a7d.zip
enhance `side_effects` (#3410)
Diffstat (limited to 'test/compress/pure_getters.js')
-rw-r--r--test/compress/pure_getters.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/compress/pure_getters.js b/test/compress/pure_getters.js
index 61ce8a92..b6e42f9d 100644
--- a/test/compress/pure_getters.js
+++ b/test/compress/pure_getters.js
@@ -1161,3 +1161,29 @@ collapse_rhs_lhs: {
}
expect_stdout: "1 3"
}
+
+drop_arguments: {
+ options = {
+ pure_getters: "strict",
+ side_effects: true,
+ }
+ input: {
+ (function() {
+ arguments.slice = function() {
+ console.log("PASS");
+ };
+ arguments[42];
+ arguments.length;
+ arguments.slice();
+ })();
+ }
+ expect: {
+ (function() {
+ arguments.slice = function() {
+ console.log("PASS");
+ };
+ arguments.slice();
+ })();
+ }
+ expect_stdout: "PASS"
+}