Documentation: refer to manual in warning 57
parent
81447489d3
commit
fba382b5a3
|
@ -18,7 +18,7 @@ then just above there should be *no* warning text.
|
|||
# Characters 46-71:
|
||||
| ((Val x, _) | (_, Val x)) when x < 0 -> ()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Warning 57: Ambiguous guarded pattern, variable x may match different or-pattern arguments
|
||||
Warning 57: Ambiguous guarded pattern, variable x may match different or-pattern arguments (see manual section 8.5)
|
||||
val ambiguous_typical_example : expr * expr -> unit = <fun>
|
||||
# Note that an Assert_failure is expected just below.
|
||||
# Exception: Assert_failure ("//toplevel//", 23, 6).
|
||||
|
@ -33,19 +33,19 @@ val ambiguous_typical_example : expr * expr -> unit = <fun>
|
|||
# Characters 33-72:
|
||||
| (`B (x, _, Some y) | `B (x, Some y, _)) when y -> ignore x
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Warning 57: Ambiguous guarded pattern, variable y may match different or-pattern arguments
|
||||
Warning 57: Ambiguous guarded pattern, variable y may match different or-pattern arguments (see manual section 8.5)
|
||||
val ambiguous__y : [> `B of 'a * bool option * bool option ] -> unit = <fun>
|
||||
# * * * * * * * * val not_ambiguous__rhs_not_protected :
|
||||
[> `B of 'a * bool option * bool option ] -> unit = <fun>
|
||||
# Characters 35-74:
|
||||
| (`B (x, _, Some y) | `B (x, Some y, _)) when x < y -> ()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Warning 57: Ambiguous guarded pattern, variable y may match different or-pattern arguments
|
||||
Warning 57: Ambiguous guarded pattern, variable y may match different or-pattern arguments (see manual section 8.5)
|
||||
val ambiguous__x_y : [> `B of 'a * 'a option * 'a option ] -> unit = <fun>
|
||||
# Characters 37-76:
|
||||
| (`B (x, z, Some y) | `B (x, Some y, z)) when x < y || Some x = z -> ()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Warning 57: Ambiguous guarded pattern, variables y,z may match different or-pattern arguments
|
||||
Warning 57: Ambiguous guarded pattern, variables y,z may match different or-pattern arguments (see manual section 8.5)
|
||||
val ambiguous__x_y_z : [> `B of 'a * 'a option * 'a option ] -> unit = <fun>
|
||||
# val not_ambiguous__disjoint_in_depth :
|
||||
[> `A of [> `B of bool | `C of bool ] ] -> unit = <fun>
|
||||
|
@ -54,7 +54,7 @@ val ambiguous__x_y_z : [> `B of 'a * 'a option * 'a option ] -> unit = <fun>
|
|||
# Characters 40-76:
|
||||
| `A (`B (Some x, _) | `B (_, Some x)) when x -> ()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Warning 57: Ambiguous guarded pattern, variable x may match different or-pattern arguments
|
||||
Warning 57: Ambiguous guarded pattern, variable x may match different or-pattern arguments (see manual section 8.5)
|
||||
val ambiguous__in_depth :
|
||||
[> `A of [> `B of bool option * bool option ] ] -> unit = <fun>
|
||||
# val not_ambiguous__several_orpats :
|
||||
|
@ -66,7 +66,7 @@ val ambiguous__in_depth :
|
|||
# Characters 43-140:
|
||||
....`A ((`B (Some x, _) | `B (_, Some x)),
|
||||
(`C (Some y, Some _, _) | `C (Some y, _, Some _))).................
|
||||
Warning 57: Ambiguous guarded pattern, variable x may match different or-pattern arguments
|
||||
Warning 57: Ambiguous guarded pattern, variable x may match different or-pattern arguments (see manual section 8.5)
|
||||
val ambiguous__first_orpat :
|
||||
[> `A of
|
||||
[> `B of 'a option * 'a option ] *
|
||||
|
@ -75,7 +75,7 @@ val ambiguous__first_orpat :
|
|||
# Characters 44-141:
|
||||
....`A ((`B (Some x, Some _, _) | `B (Some x, _, Some _)),
|
||||
(`C (Some y, _) | `C (_, Some y))).................
|
||||
Warning 57: Ambiguous guarded pattern, variable y may match different or-pattern arguments
|
||||
Warning 57: Ambiguous guarded pattern, variable y may match different or-pattern arguments (see manual section 8.5)
|
||||
val ambiguous__second_orpat :
|
||||
[> `A of
|
||||
[> `B of 'a option * 'b option * 'c option ] *
|
||||
|
@ -97,13 +97,13 @@ val ambiguous__second_orpat :
|
|||
# Characters 40-73:
|
||||
..X (Z x,Y (y,0))
|
||||
| X (Z y,Y (x,_))
|
||||
Warning 57: Ambiguous guarded pattern, variables x,y may match different or-pattern arguments
|
||||
Warning 57: Ambiguous guarded pattern, variables x,y may match different or-pattern arguments (see manual section 8.5)
|
||||
val ambiguous__amoi : amoi -> int = <fun>
|
||||
# module type S = sig val b : bool end
|
||||
# Characters 56-101:
|
||||
....(module M:S),_,(1,_)
|
||||
| _,(module M:S),(_,1)...................
|
||||
Warning 57: Ambiguous guarded pattern, variable M may match different or-pattern arguments
|
||||
Warning 57: Ambiguous guarded pattern, variable M may match different or-pattern arguments (see manual section 8.5)
|
||||
val ambiguous__module_variable :
|
||||
(module S) * (module S) * (int * int) -> bool -> int = <fun>
|
||||
# val not_ambiguous__module_variable :
|
||||
|
@ -123,7 +123,7 @@ It will remain exhaustive when constructors are added to type t.
|
|||
Characters 55-107:
|
||||
| A (x as z,(0 as y))|A (0 as y as z,x)|B (x,(y as z)) when g x (y+z) -> 1
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Warning 57: Ambiguous guarded pattern, variables x,y may match different or-pattern arguments
|
||||
Warning 57: Ambiguous guarded pattern, variables x,y may match different or-pattern arguments (see manual section 8.5)
|
||||
val ambiguous_xy_but_not_ambiguous_z : (int -> int -> bool) -> t -> int =
|
||||
<fun>
|
||||
#
|
||||
|
|
|
@ -456,7 +456,7 @@ let message = function
|
|||
"variables " ^ String.concat "," vars in
|
||||
Printf.sprintf
|
||||
"Ambiguous guarded pattern, %s may match different or-pattern \
|
||||
arguments"
|
||||
arguments (see manual section 8.5)"
|
||||
msg
|
||||
| No_cmx_file name ->
|
||||
Printf.sprintf
|
||||
|
|
Loading…
Reference in New Issue