File tree 2 files changed +48
-0
lines changed
2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -10948,6 +10948,7 @@ Compressor.prototype.compress = function(node) {
10948
10948
in_order = null;
10949
10949
return;
10950
10950
}
10951
+ if (node instanceof AST_Class) return abort = true;
10951
10952
if (node instanceof AST_Scope) return abort = true;
10952
10953
if (avoid && node instanceof AST_Symbol && avoid[node.name]) return abort = true;
10953
10954
if (node instanceof AST_SymbolRef) {
Original file line number Diff line number Diff line change @@ -3927,3 +3927,50 @@ issue_5724: {
3927
3927
expect_stdout: ReferenceError ( "a is not defined" )
3928
3928
node_version: ">=12"
3929
3929
}
3930
+
3931
+ issue_5735_1: {
3932
+ options = {
3933
+ inline : true ,
3934
+ }
3935
+ input: {
3936
+ console . log ( typeof function ( a ) {
3937
+ return class {
3938
+ static P = { ...a } ;
3939
+ } ;
3940
+ } ( [ 42. . p ] = [ ] ) ) ;
3941
+ }
3942
+ expect: {
3943
+ console . log ( typeof function ( a ) {
3944
+ return class {
3945
+ static P = { ...a } ;
3946
+ } ;
3947
+ } ( [ 42. . p ] = [ ] ) ) ;
3948
+ }
3949
+ expect_stdout: "function"
3950
+ node_version: ">=12"
3951
+ }
3952
+
3953
+ issue_5735_2: {
3954
+ options = {
3955
+ inline : true ,
3956
+ }
3957
+ input: {
3958
+ console . log ( typeof function ( a ) {
3959
+ return class {
3960
+ p = a ;
3961
+ } ;
3962
+ } ( console . log ( "PASS" ) ) ) ;
3963
+ }
3964
+ expect: {
3965
+ console . log ( typeof function ( a ) {
3966
+ return class {
3967
+ p = a ;
3968
+ } ;
3969
+ } ( console . log ( "PASS" ) ) ) ;
3970
+ }
3971
+ expect_stdout: [
3972
+ "PASS" ,
3973
+ "function" ,
3974
+ ]
3975
+ node_version: ">=12"
3976
+ }
You can’t perform that action at this time.
0 commit comments