File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -5694,7 +5694,7 @@ merge(Compressor.prototype, {
5694
5694
if (node instanceof AST_Call) {
5695
5695
var exp = node.expression;
5696
5696
var tail = exp.tail_node();
5697
- if (!(tail instanceof AST_LambdaExpression )) {
5697
+ if (!is_lambda (tail)) {
5698
5698
descend();
5699
5699
return mark_expression(exp);
5700
5700
}
Original file line number Diff line number Diff line change @@ -2066,3 +2066,34 @@ issue_5082_2: {
2066
2066
expect_stdout: "PASS"
2067
2067
node_version: ">=12"
2068
2068
}
2069
+
2070
+ issue_5142: {
2071
+ options = {
2072
+ evaluate : true ,
2073
+ merge_vars : true ,
2074
+ reduce_vars : true ,
2075
+ toplevel : true ,
2076
+ }
2077
+ input: {
2078
+ var a = 0 , b ;
2079
+ if ( ++ a )
2080
+ new class {
2081
+ p = b = null ;
2082
+ constructor ( c ) {
2083
+ console . log ( c ? "FAIL" : "PASS" ) ;
2084
+ }
2085
+ } ( b , a ) ;
2086
+ }
2087
+ expect: {
2088
+ var a = 0 , b ;
2089
+ if ( ++ a )
2090
+ new class {
2091
+ p = b = null ;
2092
+ constructor ( c ) {
2093
+ console . log ( c ? "FAIL" : "PASS" ) ;
2094
+ }
2095
+ } ( b , 1 ) ;
2096
+ }
2097
+ expect_stdout: "PASS"
2098
+ node_version: ">=12"
2099
+ }
You can’t perform that action at this time.
0 commit comments