Skip to content

Commit e770e32

Browse files
committed
Add a test for swc-project#6047
1 parent 73362fc commit e770e32

File tree

1 file changed

+22
-1
lines changed
  • crates/swc_ecma_minifier/tests

1 file changed

+22
-1
lines changed

crates/swc_ecma_minifier/tests/exec.rs

+22-1
Original file line numberDiff line numberDiff line change
@@ -10126,7 +10126,28 @@ fn feedback_regex_range() {
1012610126
/* eslint-enable prettier/prettier */
1012710127
);
1012810128
console.log('PASS')
10129-
"###;
10129+
"###;
1013010130

1013110131
run_default_exec_test(src);
1013210132
}
10133+
10134+
#[test]
10135+
fn issue_6047() {
10136+
run_default_exec_test(
10137+
r###"
10138+
let foo = () => 1;
10139+
10140+
const obj = {
10141+
get 0() {
10142+
foo = () => 2;
10143+
return 40;
10144+
},
10145+
};
10146+
console.log(obj)
10147+
10148+
var c = obj[0];
10149+
10150+
console.log(foo(c));
10151+
"###,
10152+
);
10153+
}

0 commit comments

Comments
 (0)