Skip to content

Commit

Permalink
Change name of quoted items to prevent them from colliding with the o…
Browse files Browse the repository at this point in the history
…rginal item in rec bundles hashmap.
  • Loading branch information
maximebuyse committed Dec 10, 2024
1 parent 18ac15e commit 8d980b5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion engine/lib/phases/phase_transform_hax_lib_inline.ml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,17 @@ module%inlined_contents Make (F : Features.T) = struct
Quote { quote; origin }
in
let attrs = [ Attr_payloads.to_attr attr assoc_item.span ] in
(B.{ v; span; ident = item.ident; attrs }, position))
( B.
{
v;
span;
ident =
item.ident
|> Concrete_ident.Create.map_last ~f:(fun s ->
s ^ "__hax_quote");
attrs;
},
position ))
|> List.partition_tf ~f:(snd >> [%matches? Types.Before])
|> map_fst *** map_fst
with Diagnostics.SpanFreeError.Exn (Data (context, kind)) ->
Expand Down

0 comments on commit 8d980b5

Please sign in to comment.