Compile partial reassignments into a single derived scope
Joe Savona committed
Feb 23, 2024 at 14:41 UTC
ca1e92ad91456cf70bd8810c406c7d6ba7efe065
2 files changed
+5
compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/InferReactiveScopeVariables.ts
+4
@@ -205,6 +205,10 @@ export function findDisjointMutableValues(
205
for (const [, phiId] of phi.operands) {
206
scopeIdentifiers.union([phi.id, phiId]);
207
}
208
+ } else if (fn.env.config.enableForest) {
209
+ for (const [, phiId] of phi.operands) {
210
+ scopeIdentifiers.union([phi.id, phiId]);
211
+ }
212
}
213
}
214
compiler/packages/sprout/src/SproutTodoFilter.ts
+1
@@ -438,6 +438,7 @@ const skipFilter = new Set([
438
"forest/forest-partial-reassignment-type-annotation.flow",
439
"forest/todo-forest-phi-type-unused-initializer.flow",
440
"forest/forest-hook.flow",
441
+ "forest/access-property-of-non-escaping-value",
442
443
// TODO: we probably want to always skip these
444
"rules-of-hooks/rules-of-hooks-0592bd574811",