diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2019-05-14 05:26:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-14 05:26:40 +0800 |
commit | d538a732501f6654ce359ae3ee44a55a873c6a7d (patch) | |
tree | fbced456c1b877855bac7df483e4b341e06bdaaa /test/compress/pure_getters.js | |
parent | 2e4fbdeb08ea5a9b78285218fed8b968bdd32172 (diff) | |
download | tracifyjs-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.js | 26 |
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" +} |