diff --git a/compiler/forget/src/Inference/InferReferenceEffects.ts b/compiler/forget/src/Inference/InferReferenceEffects.ts index 3b6a976ed6..246b23617a 100644 --- a/compiler/forget/src/Inference/InferReferenceEffects.ts +++ b/compiler/forget/src/Inference/InferReferenceEffects.ts @@ -736,7 +736,7 @@ function inferBlock(env: Environment, block: BasicBlock) { continue; } case "Identifier": { - env.reference(instrValue, Effect.Read); + env.reference(instrValue, Effect.Capture); const lvalue = instr.lvalue; lvalue.place.effect = Effect.Mutate; // direct aliasing: `a = b`;