diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-04-08 16:46:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-08 16:46:25 +0800 |
commit | 0479ff0c54e8eea90ff5471bd9f77cb7f2e355c3 (patch) | |
tree | 539a0a54ad70a0792e58d7b22578234ac6cf36b2 /test | |
parent | cf72fe552f5a51ccfe40c32e0fb86d549e0ca848 (diff) | |
download | tracifyjs-0479ff0c54e8eea90ff5471bd9f77cb7f2e355c3.tar.gz tracifyjs-0479ff0c54e8eea90ff5471bd9f77cb7f2e355c3.zip |
fix a couple of bugs in `global_defs` (#1802)
- `optimize()` substituted expression
- compute nested property string correctly
fixes #1801
Miscellaneous
- reset optimisation flags on all node types
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/global_defs.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/compress/global_defs.js b/test/compress/global_defs.js index a69d031e..f1ba8f32 100644 --- a/test/compress/global_defs.js +++ b/test/compress/global_defs.js @@ -145,3 +145,18 @@ mixed: { 'WARN: global_defs CONFIG.VALUE redefined [test/compress/global_defs.js:129,8]', ] } + +issue_1801: { + options = { + booleans: true, + global_defs: { + "CONFIG.FOO.BAR": true, + }, + } + input: { + console.log(CONFIG.FOO.BAR); + } + expect: { + console.log(!0); + } +} |