Skip to content

Commit

Permalink
update testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
CPunisher committed Jul 13, 2024
1 parent b299b4f commit b7636a9
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/swc_ecma_minifier/tests/fixture/issues/9186/1/input.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
o = {
foo() {
return val;
},
s: "test",
};
console.log(o.foo().length);

o = {
foo(val = this.s) {
return val;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
console.log((o = {
foo: ()=>val,
s: "test"
}).foo().length), console.log((o = {
foo (val1 = this.s) {
return val1;
},
s: "test"
}).foo().length);
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"unsafe_arrows": true,
"ecma": 2015,
"evaluate": true,
"side_effects": true
}
7 changes: 7 additions & 0 deletions crates/swc_ecma_minifier/tests/fixture/issues/9186/2/input.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
console.log(
(function () {
while (true) {
console.log(123);
}
})()
);
console.log(
(function (a = this.a) {
while (true) {
Expand Down
10 changes: 10 additions & 0 deletions crates/swc_ecma_minifier/tests/fixture/issues/9186/2/output.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
console.log((()=>{
while(true){
console.log(123);
}
})());
console.log(function(a = this.a) {
while(true){
console.log(123);
}
}());

0 comments on commit b7636a9

Please sign in to comment.