minor clean-up (#5209)
This commit is contained in:
@@ -12390,9 +12390,7 @@ Compressor.prototype.compress = function(node) {
|
||||
}
|
||||
});
|
||||
|
||||
AST_Arrow.DEFMETHOD("contains_super", return_false);
|
||||
AST_AsyncArrow.DEFMETHOD("contains_super", return_false);
|
||||
AST_Lambda.DEFMETHOD("contains_super", function() {
|
||||
AST_LambdaExpression.DEFMETHOD("contains_super", function() {
|
||||
var result;
|
||||
var self = this;
|
||||
self.walk(new TreeWalker(function(node) {
|
||||
@@ -12402,8 +12400,6 @@ Compressor.prototype.compress = function(node) {
|
||||
}));
|
||||
return result;
|
||||
});
|
||||
AST_LambdaDefinition.DEFMETHOD("contains_super", return_false);
|
||||
AST_Scope.DEFMETHOD("contains_super", return_false);
|
||||
|
||||
AST_Arrow.DEFMETHOD("contains_this", return_false);
|
||||
AST_AsyncArrow.DEFMETHOD("contains_this", return_false);
|
||||
|
||||
@@ -363,6 +363,28 @@ negate: {
|
||||
}
|
||||
|
||||
inline_this: {
|
||||
options = {
|
||||
inline: true,
|
||||
}
|
||||
input: {
|
||||
var p = "PASS";
|
||||
console.log({
|
||||
p: "FAIL",
|
||||
q: (() => this.p)(),
|
||||
}.q);
|
||||
}
|
||||
expect: {
|
||||
var p = "PASS";
|
||||
console.log({
|
||||
p: "FAIL",
|
||||
q: this.p,
|
||||
}.q);
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
node_version: ">=4"
|
||||
}
|
||||
|
||||
dont_inline_this: {
|
||||
options = {
|
||||
inline: true,
|
||||
}
|
||||
|
||||
@@ -340,6 +340,33 @@ inline_await_3_trim: {
|
||||
node_version: ">=8"
|
||||
}
|
||||
|
||||
inline_await_this: {
|
||||
options = {
|
||||
awaits: true,
|
||||
inline: true,
|
||||
}
|
||||
input: {
|
||||
var p = "FAIL";
|
||||
({
|
||||
p: "PASS",
|
||||
async f() {
|
||||
return await (async () => this.p)();
|
||||
},
|
||||
}).f().then(console.log);
|
||||
}
|
||||
expect: {
|
||||
var p = "FAIL";
|
||||
({
|
||||
p: "PASS",
|
||||
async f() {
|
||||
return await this.p;
|
||||
},
|
||||
}).f().then(console.log);
|
||||
}
|
||||
expect_stdout: "PASS"
|
||||
node_version: ">=8"
|
||||
}
|
||||
|
||||
await_unary: {
|
||||
options = {
|
||||
awaits: true,
|
||||
|
||||
Reference in New Issue
Block a user