diff options
Diffstat (limited to 'utils/warnings.ml')
-rw-r--r-- | utils/warnings.ml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/utils/warnings.ml b/utils/warnings.ml index 154f0e6563..8e67881e4c 100644 --- a/utils/warnings.ml +++ b/utils/warnings.ml @@ -23,7 +23,7 @@ type t = | Deprecated of string (* 3 *) | Fragile_match of string (* 4 *) | Partial_application (* 5 *) - | Labels_omitted (* 6 *) + | Labels_omitted of string list (* 6 *) | Method_override of string list (* 7 *) | Partial_match of string (* 8 *) | Non_closed_record_pattern of string (* 9 *) @@ -82,7 +82,7 @@ let number = function | Deprecated _ -> 3 | Fragile_match _ -> 4 | Partial_application -> 5 - | Labels_omitted -> 6 + | Labels_omitted _ -> 6 | Method_override _ -> 7 | Partial_match _ -> 8 | Non_closed_record_pattern _ -> 9 @@ -260,8 +260,12 @@ let message = function | Partial_application -> "this function application is partial,\n\ maybe some arguments are missing." - | Labels_omitted -> - "labels were omitted in the application of this function." + | Labels_omitted [] -> assert false + | Labels_omitted [l] -> + "label " ^ l ^ " was omitted in the application of this function." + | Labels_omitted ls -> + "labels " ^ String.concat ", " ls ^ + " were omitted in the application of this function." | Method_override [lab] -> "the method " ^ lab ^ " is overridden." | Method_override (cname :: slist) -> |