@@ -13262,8 +13262,7 @@ Compressor.prototype.compress = function(node) {
|
|||||||
def(AST_New, noop);
|
def(AST_New, noop);
|
||||||
def(AST_Return, function(compressor, scope, no_return, in_loop) {
|
def(AST_Return, function(compressor, scope, no_return, in_loop) {
|
||||||
var value = this.value;
|
var value = this.value;
|
||||||
if (value) value = value.try_inline(compressor, scope, undefined, in_loop === "try");
|
return value && value.try_inline(compressor, scope, undefined, in_loop === "try");
|
||||||
return value || this;
|
|
||||||
});
|
});
|
||||||
function inline_sequence(compressor, scope, no_return, in_loop, node, skip) {
|
function inline_sequence(compressor, scope, no_return, in_loop, node, skip) {
|
||||||
var body = [], exprs = node.expressions, no_ret = no_return;
|
var body = [], exprs = node.expressions, no_ret = no_return;
|
||||||
|
|||||||
@@ -6146,18 +6146,21 @@ issue_4265: {
|
|||||||
a;
|
a;
|
||||||
var a;
|
var a;
|
||||||
}() ]);
|
}() ]);
|
||||||
return 0;
|
return 42;
|
||||||
}
|
}
|
||||||
f();
|
console.log(f());
|
||||||
}
|
}
|
||||||
expect: {
|
expect: {
|
||||||
function f() {
|
function f() {
|
||||||
var a;
|
var a;
|
||||||
return console, console.log(a), 0;
|
return console, console.log(a), 42;
|
||||||
}
|
}
|
||||||
f();
|
console.log(f());
|
||||||
}
|
}
|
||||||
expect_stdout: "undefined"
|
expect_stdout: [
|
||||||
|
"undefined",
|
||||||
|
"42",
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
trailing_comma: {
|
trailing_comma: {
|
||||||
|
|||||||
Reference in New Issue
Block a user