suppress inline within substituted AST_Scope (#2658)

fixes #2657
This commit is contained in:
Alex Lam S.L
2017-12-26 18:56:59 +08:00
committed by GitHub
parent 05e7d34ed4
commit 7f342cb3e3
2 changed files with 31 additions and 1 deletions

View File

@@ -1447,3 +1447,33 @@ recursive_inline: {
}
expect: {}
}
issue_2657: {
options = {
inline: true,
reduce_vars: true,
sequences: true,
unused: true,
}
input: {
"use strict";
console.log(function f() {
return h;
function g(b) {
return b || b();
}
function h(a) {
g(a);
return a;
}
}()(42));
}
expect: {
"use strict";
console.log(function(a) {
return b = a, b || b(), a;
var b;
}(42));
}
expect_stdout: "42"
}