mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[hir] Mark Identifiers aliased as Effect.Capture
This commit is contained in:
@@ -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`;
|
||||
|
||||
Reference in New Issue
Block a user