Keep const in own scope while compressing

- Fixes #1205
- Fix provided by @kzc
This commit is contained in:
Anthony Van de Gejuchte
2016-07-14 18:43:50 +02:00
committed by Richard van Velzen
parent eb63fece2f
commit 7eb52d2837
2 changed files with 44 additions and 2 deletions

View File

@@ -810,7 +810,7 @@ merge(Compressor.prototype, {
CHANGED = true;
}
else if (stat instanceof AST_For
&& prev instanceof AST_Definitions
&& prev instanceof AST_Var
&& (!stat.init || stat.init.TYPE == prev.TYPE)) {
CHANGED = true;
a.pop();