@@ -99,8 +99,8 @@ issue_4664: {
|
||||
expect: {
|
||||
(function f() {
|
||||
new function(a) {
|
||||
console.log(typeof f, 1073741824, typeof this);
|
||||
}(A = 0);
|
||||
console.log(typeof f, a, typeof this);
|
||||
}((A = 0, 2 ** 30));
|
||||
})();
|
||||
}
|
||||
expect_stdout: "function 1073741824 object"
|
||||
|
||||
@@ -6600,3 +6600,32 @@ shorter_without_void: {
|
||||
"baz",
|
||||
]
|
||||
}
|
||||
|
||||
issue_5120: {
|
||||
options = {
|
||||
functions: true,
|
||||
reduce_vars: true,
|
||||
toplevel: true,
|
||||
unused: true,
|
||||
}
|
||||
input: {
|
||||
var a = function f() {
|
||||
function g() {
|
||||
f || g();
|
||||
}
|
||||
g();
|
||||
return f.valueOf();
|
||||
};
|
||||
console.log(a() === a ? "PASS" : "FAIL");
|
||||
}
|
||||
expect: {
|
||||
function a() {
|
||||
(function g() {
|
||||
a || g();
|
||||
})();
|
||||
return a.valueOf();
|
||||
}
|
||||
console.log(a() === a ? "PASS" : "FAIL");
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user