From 0e9899eb8c6779ea706e76e5d6224a8332c3ce59 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Mon, 4 Aug 2025 10:35:05 +0200 Subject: Updated an error message in a better way --- test/type_of.ml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/type_of.ml b/test/type_of.ml index 1b84faa..88b55b7 100644 --- a/test/type_of.ml +++ b/test/type_of.ml @@ -8,7 +8,9 @@ let message level = { level; loc = _position; - message = "The type Integer is expected but got String"; + message = + "The expression has type String but the context was expecting a \ + Integer"; }; ] @@ -18,7 +20,9 @@ let message' level = { level; loc = _position; - message = "The type String is expected but got Integer"; + message = + "The expression has type Integer but the context was expecting a \ + String"; }; ] @@ -28,7 +32,9 @@ let integer_as_string = { level = Warn; loc = _position; - message = "The type Integer is expected but got Integer as String"; + message = + "The expression has type String but the context was expecting a \ + Integer"; }; ] @@ -60,7 +66,9 @@ let type_comparaison_mismatch () = { level = Warn; loc = _position; - message = "The type String is expected but got Integer"; + message = + "The expression has type Integer but the context was expecting a \ + String"; }; ] @@ -70,7 +78,8 @@ let wrong_predicate () = { level = Warn; loc = _position; - message = "The type Bool is expected but got String"; + message = + "The expression has type String but the context was expecting a Bool"; }; ] -- cgit v1.2.3