fix infinite loop during inline (#2645)

fixes #2644
This commit is contained in:
Alex Lam S.L
2017-12-25 01:57:11 +08:00
committed by GitHub
parent f1556cb945
commit cb6a92892f
2 changed files with 30 additions and 8 deletions

View File

@@ -1423,3 +1423,27 @@ issue_2630_5: {
}
expect_stdout: "155"
}
recursive_inline: {
options = {
inline: true,
reduce_funcs: true,
reduce_vars: true,
sequences: true,
toplevel: true,
unused: true,
}
input: {
function f() {
h();
}
function g(a) {
a();
}
function h(b) {
g();
if (b) x();
}
}
expect: {}
}