@samitouri / QOS-React-1 / commits / 05d620521b

[ez] missed TODO bailout for holey arrays

--- Missed this when adding #2114 (only found when running thousands of fb components through forget and noticing that holey arrays still fail)

Mofei Zhang committed Oct 4, 2023 at 14:01 UTC 05d620521b4f628312020dec50eb5f36d085b32d
1 file changed +9
compiler/packages/babel-plugin-react-forget/src/HIR/BuildHIR.ts
+9
@@ -3144,6 +3144,15 @@ function lowerAssignment(
3144 items.push({
3145 kind: "Hole",
3146 });
3147 +
3148 + if (builder.environment.config.bailoutOnHoleyArrays) {
3149 + builder.errors.push({
3150 + reason: `(BuildHIR::lower) Fix babel holey array backward compatibility.`,
3151 + severity: ErrorSeverity.Todo,
3152 + loc: lvalue.node.loc ?? null,
3153 + suggestions: null,
3154 + });
3155 + }
3156 continue;
3157 }
3158 if (element.isRestElement()) {