@@ -3586,3 +3586,36 @@ issue_5531_3: {
|
||||
expect_stdout: "foo"
|
||||
node_version: ">=16"
|
||||
}
|
||||
|
||||
issue_5662: {
|
||||
options = {
|
||||
inline: true,
|
||||
reduce_vars: true,
|
||||
}
|
||||
input: {
|
||||
console.log(new (function() {
|
||||
var g = function(a) {
|
||||
return a;
|
||||
};
|
||||
return class {
|
||||
h(b) {
|
||||
return g(b);
|
||||
}
|
||||
};
|
||||
}())().h("PASS"));
|
||||
}
|
||||
expect: {
|
||||
console.log(new (function() {
|
||||
var g = function(a) {
|
||||
return a;
|
||||
};
|
||||
return class {
|
||||
h(b) {
|
||||
return g(b);
|
||||
}
|
||||
};
|
||||
}())().h("PASS"));
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
node_version: ">=6"
|
||||
}
|
||||
|
||||
@@ -466,7 +466,7 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options)
|
||||
}
|
||||
}
|
||||
else if (node instanceof U.AST_VarDef) {
|
||||
if (node.value && !(parent instanceof U.AST_Const)) {
|
||||
if (node.value && !(node.name instanceof U.AST_Destructured || parent instanceof U.AST_Const)) {
|
||||
node.start._permute++;
|
||||
CHANGED = true;
|
||||
return new U.AST_VarDef({
|
||||
|
||||
Reference in New Issue
Block a user