diff --git a/compiler/packages/babel-plugin-react-forget/src/Inference/InferReferenceEffects.ts b/compiler/packages/babel-plugin-react-forget/src/Inference/InferReferenceEffects.ts index 23f66247a7..6b76c4aae7 100644 --- a/compiler/packages/babel-plugin-react-forget/src/Inference/InferReferenceEffects.ts +++ b/compiler/packages/babel-plugin-react-forget/src/Inference/InferReferenceEffects.ts @@ -1640,17 +1640,6 @@ function inferBlock( const lvalue = instr.lvalue; lvalue.effect = Effect.ConditionallyMutate; const valueKind = state.kind(instrValue.place); - CompilerError.invariant( - valueKind.kind === ValueKind.Mutable || - valueKind.kind === ValueKind.Context, - { - reason: - "[InferReferenceEffects] Context variables are always mutable.", - description: null, - loc: instrValue.loc, - suggestions: null, - } - ); state.initialize(instrValue, valueKind); state.define(lvalue, instrValue); continue; diff --git a/compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.todo-multiple-calls-to-hoisted-callback-from-other-callback.expect.md b/compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.todo-multiple-calls-to-hoisted-callback-from-other-callback.expect.md deleted file mode 100644 index 76d1c69c04..0000000000 --- a/compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.todo-multiple-calls-to-hoisted-callback-from-other-callback.expect.md +++ /dev/null @@ -1,46 +0,0 @@ - -## Input - -```javascript -// @enableAssumeHooksFollowRulesOfReact @enableTransitivelyFreezeFunctionExpressions -function Component(props) { - const [_state, setState] = useState(); - const a = () => { - return b(); - }; - const b = () => { - return ( - <> -