Skip to content

Commit 2bd1ceb

Browse files
Copilotkdy1
andcommitted
Add test case for IIFE const declaration bug fix
Co-authored-by: kdy1 <29931815+kdy1@users.noreply.github.com>
1 parent 0274151 commit 2bd1ceb

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"unused": true,
3+
"negate_iife": true,
4+
"collapse_vars": true,
5+
"evaluate": true
6+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
(function () {
2+
const obj = { value: 42 };
3+
console.log(obj === null || obj === void 0 ? void 0 : obj.value)
4+
})()
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
!function() {
2+
const obj = {
3+
value: 42
4+
};
5+
console.log(null == obj ? void 0 : obj.value);
6+
}();

0 commit comments

Comments
 (0)