collapse_vars should not replace constant in for-in init section (#1538)

fixes #1537
This commit is contained in:
kzc
2017-03-02 14:51:15 -05:00
committed by Alex Lam S.L
parent 70d72ad806
commit 4d63d4f5b3
2 changed files with 21 additions and 3 deletions

View File

@@ -1315,3 +1315,17 @@ collapse_vars_regexp: {
})();
}
}
issue_1537: {
options = {
collapse_vars: true,
}
input: {
var k = '';
for (k in {prop: 'val'}){}
}
expect: {
var k = '';
for (k in {prop: 'val'});
}
}