diff --git a/compiler/forget/src/HIR/BuildHIR.ts b/compiler/forget/src/HIR/BuildHIR.ts index 2cd05e0edf..3929663165 100644 --- a/compiler/forget/src/HIR/BuildHIR.ts +++ b/compiler/forget/src/HIR/BuildHIR.ts @@ -1675,12 +1675,7 @@ function gatherCapturedDeps( return; } - captured.add({ - kind: "Identifier", - identifier: builder.resolveIdentifier(path), - effect: Effect.Unknown, - loc: path.node.loc ?? GeneratedSource, - }); + captured.add(lowerExpressionToPlace(builder, path)); }, });