fix AST_For.init patch-up in drop_unused() (#1839)

fixes #1838
This commit is contained in:
Alex Lam S.L
2017-04-23 01:51:56 +08:00
committed by GitHub
parent ca32a09032
commit 45ce369480
2 changed files with 25 additions and 0 deletions

View File

@@ -1092,3 +1092,25 @@ issue_1830_2: {
}
expect_stdout: "1"
}
issue_1838: {
options = {
join_vars: true,
loops: true,
unused: true,
}
beautify = {
beautify: true,
}
input: {
function f() {
var b = a;
while (c);
}
}
expect_exact: [
"function f() {",
" for (a; c; ) ;",
"}",
]
}