diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-12-18 12:07:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-18 12:07:53 +0800 |
commit | 0b0eac1d5dc6e1cc1e9bf3682871cafdda59066d (patch) | |
tree | f58e51ee9651e22eab2c68a0f17c98139da84582 /test/compress/properties.js | |
parent | b29fc8b27c7bf4f48ff354ea2b9d55f7f4b69f79 (diff) | |
download | tracifyjs-0b0eac1d5dc6e1cc1e9bf3682871cafdda59066d.tar.gz tracifyjs-0b0eac1d5dc6e1cc1e9bf3682871cafdda59066d.zip |
drop property assignment to constants (#2612)
Diffstat (limited to 'test/compress/properties.js')
-rw-r--r-- | test/compress/properties.js | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/compress/properties.js b/test/compress/properties.js index 6d4c0281..16374ef8 100644 --- a/test/compress/properties.js +++ b/test/compress/properties.js @@ -1054,3 +1054,43 @@ issue_2513: { "undefined undefined", ] } + +const_prop_assign_strict: { + options = { + pure_getters: "strict", + side_effects: true, + } + input: { + function Simulator() { + /abc/.index = 1; + this._aircraft = []; + } + (function() {}).prototype.destroy = x(); + } + expect: { + function Simulator() { + this._aircraft = []; + } + x(); + } +} + +const_prop_assign_pure: { + options = { + pure_getters: true, + side_effects: true, + } + input: { + function Simulator() { + /abc/.index = 1; + this._aircraft = []; + } + (function() {}).prototype.destroy = x(); + } + expect: { + function Simulator() { + this._aircraft = []; + } + x(); + } +} |