diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/checks/get_type.ml | 3 | ||||
| -rw-r--r-- | lib/checks/type_of.ml | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/checks/get_type.ml b/lib/checks/get_type.ml index 00270c2..c6d1e44 100644 --- a/lib/checks/get_type.ml +++ b/lib/checks/get_type.ml @@ -12,8 +12,7 @@ type type_of = | Integer (** A numeric value *) | Bool (** A boolean, not a real type *) | String (** String value *) - | NumericString - [@printer fun fmt _ -> Format.pp_print_string fmt "Integer as String"] + | NumericString [@printer fun fmt _ -> Format.pp_print_string fmt "String"] (** String containing a numeric value *) [@@deriving show { with_path = false }, eq] diff --git a/lib/checks/type_of.ml b/lib/checks/type_of.ml index 243c8b3..4593842 100644 --- a/lib/checks/type_of.ml +++ b/lib/checks/type_of.ml @@ -95,8 +95,9 @@ module Helper = struct else let result_type = match actual.t with Variable v -> v | Raw r -> r in let message = - Format.asprintf "The type %a is expected but got %a" Get_type.pp_type_of - expected Get_type.pp_type_of result_type + Format.asprintf + "The expression has type %a but the context was expecting a %a" + Get_type.pp_type_of result_type Get_type.pp_type_of expected in Report.message level actual.pos message :: report |
