fix various for-of bugs (#2800)

- disable `rename` pass on harmony due to problem with for-of loops

fixes #2794
This commit is contained in:
kzc
2018-01-17 01:46:23 -05:00
committed by Alex Lam S.L
parent 1b2e6b81a2
commit 4f57d8746b
4 changed files with 203 additions and 7 deletions

View File

@@ -151,7 +151,9 @@ function minify(files, options) {
toplevel = toplevel.wrap_commonjs(options.wrap);
}
if (timings) timings.rename = Date.now();
if (options.rename) {
// disable rename on harmony due to expand_names bug in for-of loops
// https://github.com/mishoo/UglifyJS2/issues/2794
if (0 && options.rename) {
toplevel.figure_out_scope(options.mangle);
toplevel.expand_names(options.mangle);
}