Skip to content

Commit b4834b7

Browse files
committed
acknowledge another bug was fixed
1 parent adb3d35 commit b4834b7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- Compiler:
1111
- Fix `=!=>` that was adding a head cut, rather than a tail cut, in some
1212
cases
13+
- Fix compilation bug concerning `Loc.t` being erroneusly compared
1314
1415
# v3.3.1 (September 2025)
1516

src/utils/util.ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ module Loc = struct
161161

162162
let pp fmt l =Fmt.fprintf fmt "@[%s@]" (to_string l)
163163
let show l = to_string l
164+
165+
(* WARNING: loc comparison must be correct, otherwise two occurrences of
166+
the samy symbol may be compiled to different constants (e.g. if the payload
167+
is different) *)
164168
let compare l1 l2 =
165169
let x = Stdlib.compare l1.source_start l2.source_start in
166170
if x = 0 then Stdlib.compare { l1 with client_payload = None } { l2 with client_payload = None } else x

0 commit comments

Comments
 (0)