Skip to content

Commit 9e7c571

Browse files
committed
Fix hoisted module matching after tag removal
Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>
1 parent 7f2cfa4 commit 9e7c571

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

compiler/core/lam_compile_main.ml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ let js_hoisted_aliases (export_ids : Ident.t list)
149149
lam -> (
150150
match fst (resolve_binding seen base) with
151151
| Lam.Lprim
152-
{primitive = Lam_primitive.Pmakeblock (_, Blk_module _, _); args}
153-
-> (
152+
{primitive = Lam_primitive.Pmakeblock (Blk_module _, _); args} -> (
154153
match List.nth_opt args pos with
155154
| Some field -> resolve_binding seen field
156155
| None -> (lam, None))
@@ -173,10 +172,8 @@ let js_hoisted_aliases (export_ids : Ident.t list)
173172
| field :: fields -> (
174173
match resolve Set_ident.empty lam with
175174
| Lam.Lprim
176-
{
177-
primitive = Lam_primitive.Pmakeblock (_, Blk_module names, _);
178-
args;
179-
} -> (
175+
{primitive = Lam_primitive.Pmakeblock (Blk_module names, _); args}
176+
-> (
180177
match find_field field 0 names args with
181178
| Some (pos, arg) -> find_path arg fields ((pos, field) :: positions)
182179
| None -> None)

0 commit comments

Comments
 (0)