summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSon Ho2024-03-29 11:33:32 +0100
committerSon Ho2024-03-29 11:33:32 +0100
commitbd89156cbdcb047ed9a6c557e9873dd5724c391f (patch)
treeacf385d6dc388f78377828c83f13df7c3b25c5e7
parent6f4833f84dd3ec17311b5e6ca9f5c1ad94ff7564 (diff)
Make a minor modification
Diffstat (limited to '')
-rw-r--r--compiler/Main.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/Main.ml b/compiler/Main.ml
index 88c32ca9..798bcec3 100644
--- a/compiler/Main.ml
+++ b/compiler/Main.ml
@@ -282,7 +282,10 @@ let () =
(* The error should have been saved *)
let meta =
match !Errors.error_list with
- | (m, _) :: _ -> m
+ | (m, msg') :: _ ->
+ (* The last saved message should be the current error - but
+ good to check *)
+ if msg = msg' then m else None
| _ -> (* Want to be safe here *) None
in
let msg =