fix corner case in reduce_vars (#3341)
This commit is contained in:
@@ -6686,3 +6686,33 @@ issues_3267_3: {
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
}
|
||||
|
||||
issue_3297: {
|
||||
options = {
|
||||
reduce_vars: true,
|
||||
unused: true,
|
||||
}
|
||||
input: {
|
||||
(function() {
|
||||
function f() {
|
||||
var a;
|
||||
var b = function a() {
|
||||
console.log(a === b) && f();
|
||||
};
|
||||
b();
|
||||
}
|
||||
f();
|
||||
})();
|
||||
}
|
||||
expect: {
|
||||
(function() {
|
||||
(function f() {
|
||||
var b = function a() {
|
||||
console.log(a === b) && f();
|
||||
};
|
||||
b();
|
||||
})();
|
||||
})();
|
||||
}
|
||||
expect_stdout: "true"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user