From bd89156cbdcb047ed9a6c557e9873dd5724c391f Mon Sep 17 00:00:00 2001 From: Son Ho Date: Fri, 29 Mar 2024 11:33:32 +0100 Subject: Make a minor modification --- compiler/Main.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'compiler') 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 = -- cgit v1.2.3