diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-03-01 02:03:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-01 02:03:47 +0800 |
commit | b34fa11a13221b7ad26ea48f18fcf2f5903c94c1 (patch) | |
tree | 3e17aeb5807984d63c9e903814072fcb9cdc722f /test/compress | |
parent | 320984c5f59128e2973243b1ac80ae57179fd84d (diff) | |
download | tracifyjs-b34fa11a13221b7ad26ea48f18fcf2f5903c94c1.tar.gz tracifyjs-b34fa11a13221b7ad26ea48f18fcf2f5903c94c1.zip |
fix `evaluate` on object getter & setter (#1515)
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/evaluate.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js index 6bed73fb..f84436df 100644 --- a/test/compress/evaluate.js +++ b/test/compress/evaluate.js @@ -337,6 +337,32 @@ unsafe_object_repeated: { } } +unsafe_object_accessor: { + options = { + evaluate: true, + reduce_vars: true, + unsafe: true, + } + input: { + function f() { + var a = { + get b() {}, + set b() {} + }; + return {a:a}; + } + } + expect: { + function f() { + var a = { + get b() {}, + set b() {} + }; + return {a:a}; + } + } +} + unsafe_function: { options = { evaluate : true, |