aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChimrod <>2025-08-04 10:35:05 +0200
committerChimrod <>2025-08-04 14:00:40 +0200
commit0e9899eb8c6779ea706e76e5d6224a8332c3ce59 (patch)
treeb95430805f13610d2f02d82f5a6732e57c8d49b0 /test
parentc3982131f3075689a15512daef67e254f27371ea (diff)
Updated an error message in a better way
Diffstat (limited to 'test')
-rw-r--r--test/type_of.ml19
1 files changed, 14 insertions, 5 deletions
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";
};
]