From ef5636c25d5d274d12548a047b9f88ee28efea30 Mon Sep 17 00:00:00 2001 From: Sathya Gunasekaran Date: Thu, 19 Jan 2023 12:13:34 +0000 Subject: [PATCH] =?UTF-8?q?[=CE=BB]=20Use=20lowerExpression=20to=20create?= =?UTF-8?q?=20captured=20identifier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compiler/forget/src/HIR/BuildHIR.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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)); }, });