diff options
Diffstat (limited to 'utils/warnings.ml')
-rw-r--r-- | utils/warnings.ml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/utils/warnings.ml b/utils/warnings.ml index dd6b784d4..bc24b8021 100644 --- a/utils/warnings.ml +++ b/utils/warnings.ml @@ -59,6 +59,7 @@ type t = | Unused_rec_flag (* 39 *) | Name_out_of_scope of string list * bool (* 40 *) | Ambiguous_name of string list * bool (* 41 *) + | Disambiguated_name of string (* 42 *) ;; (* If you remove a warning, leave a hole in the numbering. NEVER change @@ -109,9 +110,10 @@ let number = function | Unused_rec_flag -> 39 | Name_out_of_scope _ -> 40 | Ambiguous_name _ -> 41 + | Disambiguated_name _ -> 42 ;; -let last_warning_number = 41 +let last_warning_number = 42 (* Must be the max number returned by the [number] function. *) let letter = function @@ -206,7 +208,7 @@ let parse_opt flags s = let parse_options errflag s = parse_opt (if errflag then error else active) s;; (* If you change these, don't forget to change them in man/ocamlc.m *) -let defaults_w = "+a-4-6-7-9-27-29-32..39-41";; +let defaults_w = "+a-4-6-7-9-27-29-32..39-41..42";; let defaults_warn_error = "-a";; let () = parse_options false defaults_w;; @@ -318,6 +320,8 @@ let message = function | Ambiguous_name (slist, true) -> "this record contains fields that are ambiguous: " ^ String.concat " " slist ^ "." + | Disambiguated_name s -> + "this use of " ^ s ^ " required disambiguation." ;; let nerrors = ref 0;; @@ -405,6 +409,7 @@ let descriptions = 39, "Unused rec flag."; 40, "Constructor or label name used out of scope."; 41, "Ambiguous constructor or label name."; + 42, "Disambiguated name."; ] ;; |