[λ] Use lowerExpression to create captured identifier
Sathya Gunasekaran committed
Jan 19, 2023 at 12:13 UTC
ef5636c25d5d274d12548a047b9f88ee28efea30
1 file changed
+1
-6
compiler/forget/src/HIR/BuildHIR.ts
+1
-6
@@ -1675,12 +1675,7 @@ function gatherCapturedDeps(
1675
return;
1676
}
1677
1678
- captured.add({
1679
- kind: "Identifier",
1680
- identifier: builder.resolveIdentifier(path),
1681
- effect: Effect.Unknown,
1682
- loc: path.node.loc ?? GeneratedSource,
1683
- });
1678
+ captured.add(lowerExpressionToPlace(builder, path));
1679
},
1680
});
1681