From 199e284edaf1d2fd8b034ca15cc4dbe0dad32456 Mon Sep 17 00:00:00 2001 From: Sathya Gunasekaran Date: Fri, 10 Feb 2023 17:26:21 +0000 Subject: [PATCH] [hir] Mark Identifiers aliased as Effect.Capture --- compiler/forget/src/Inference/InferReferenceEffects.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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`;