@@ -2356,7 +2356,7 @@ Compressor.prototype.compress = function(node) {
|
|||||||
if (prop.key instanceof AST_Node) prop.key = prop.key.transform(tt);
|
if (prop.key instanceof AST_Node) prop.key = prop.key.transform(tt);
|
||||||
if (prop.static) {
|
if (prop.static) {
|
||||||
if (prop instanceof AST_ClassField) {
|
if (prop instanceof AST_ClassField) {
|
||||||
props.push(prop);
|
if (prop.value) props.push(prop);
|
||||||
} else if (prop instanceof AST_ClassInit) {
|
} else if (prop instanceof AST_ClassInit) {
|
||||||
props.unshift(prop);
|
props.unshift(prop);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3179,3 +3179,25 @@ issue_5502: {
|
|||||||
expect_stdout: "PASS 42"
|
expect_stdout: "PASS 42"
|
||||||
node_version: ">=12"
|
node_version: ">=12"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_5504: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
"use strict";
|
||||||
|
var a;
|
||||||
|
console.log((a = 42, class {
|
||||||
|
static p;
|
||||||
|
}).p);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
"use strict";
|
||||||
|
var a;
|
||||||
|
console.log((a = 42, class {
|
||||||
|
static p;
|
||||||
|
}).p);
|
||||||
|
}
|
||||||
|
expect_stdout: "undefined"
|
||||||
|
node_version: ">=12"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user