diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-01-03 02:34:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-03 10:34:46 +0800 |
commit | e8c04f8cb691ee132c7d3b0b10db0d7da8ce3bf6 (patch) | |
tree | a63d1918822a0d876351d55df5a1f26f16f260b9 /test/input/reduce | |
parent | 110c1ac0978dbfbcd16150abadaa9f049bafa04c (diff) | |
download | tracifyjs-e8c04f8cb691ee132c7d3b0b10db0d7da8ce3bf6.tar.gz tracifyjs-e8c04f8cb691ee132c7d3b0b10db0d7da8ce3bf6.zip |
suppress invalid AST transform in `--reduce-test` (#4498)
Diffstat (limited to 'test/input/reduce')
-rw-r--r-- | test/input/reduce/destructured_assign.js | 3 | ||||
-rw-r--r-- | test/input/reduce/destructured_assign.reduced.js | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/input/reduce/destructured_assign.js b/test/input/reduce/destructured_assign.js new file mode 100644 index 00000000..26e1580b --- /dev/null +++ b/test/input/reduce/destructured_assign.js @@ -0,0 +1,3 @@ +var o = {}; +[ o[1 + .1 + .1] ] = [ 42 ]; +console.log(o[1.2]); diff --git a/test/input/reduce/destructured_assign.reduced.js b/test/input/reduce/destructured_assign.reduced.js new file mode 100644 index 00000000..887810d4 --- /dev/null +++ b/test/input/reduce/destructured_assign.reduced.js @@ -0,0 +1,17 @@ +// (beautified) +var o = {}; + +[ o[1 + .1 + .1] ] = []; + +console.log(o); +// output: { '1.2000000000000002': undefined } +// +// minify: { '1.2': undefined } +// +// options: { +// "compress": { +// "unsafe_math": true +// }, +// "mangle": false, +// "validate": true +// }
\ No newline at end of file |