@samitouri / QOS-React-2 / commits / 199e284eda

[hir] Mark Identifiers aliased as Effect.Capture

Sathya Gunasekaran committed Feb 10, 2023 at 17:26 UTC 199e284edaf1d2fd8b034ca15cc4dbe0dad32456
1 file changed +1 -1
compiler/forget/src/Inference/InferReferenceEffects.ts
+1 -1
@@ -736,7 +736,7 @@ function inferBlock(env: Environment, block: BasicBlock) {
736 continue;
737 }
738 case "Identifier": {
739 - env.reference(instrValue, Effect.Read);
739 + env.reference(instrValue, Effect.Capture);
740 const lvalue = instr.lvalue;
741 lvalue.place.effect = Effect.Mutate;
742 // direct aliasing: `a = b`;