summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmaël Guéneau <armael.gueneau@ens-lyon.fr>2018-10-19 21:01:06 +0200
committerArmaël Guéneau <armael.gueneau@ens-lyon.fr>2018-10-19 23:38:25 +0200
commit9edbda8f70d661b7be2325e6d82afe5595cf608b (patch)
tree3d9e7edf3d483f7ec860d1e2fccd17e8cddabb30
parent137078e674fc786d390a1b2d75f850ee17d41301 (diff)
downloadocaml-9edbda8f70d661b7be2325e6d82afe5595cf608b.tar.gz
Update the tests
-rw-r--r--testsuite/tests/basic-modules/recursive_module_evaluation_errors.ml8
-rw-r--r--testsuite/tests/basic-more/morematch.compilers.reference4
-rw-r--r--testsuite/tests/basic-more/robustmatch.compilers.reference70
-rw-r--r--testsuite/tests/basic/patmatch_incoherence.ml16
-rw-r--r--testsuite/tests/letrec-check/basic.ml14
-rw-r--r--testsuite/tests/letrec-check/modules.ml2
-rw-r--r--testsuite/tests/letrec-check/unboxed.ml12
-rw-r--r--testsuite/tests/match-exception-warnings/exhaustiveness_warnings.ml12
-rw-r--r--testsuite/tests/tool-toplevel/error_highlighting.compilers.reference4
-rw-r--r--testsuite/tests/typing-extensions/open_types.ocaml.reference4
-rw-r--r--testsuite/tests/typing-gadts/pr5785.ml2
-rw-r--r--testsuite/tests/typing-gadts/pr5906.ml6
-rw-r--r--testsuite/tests/typing-gadts/pr7260.ml8
-rw-r--r--testsuite/tests/typing-gadts/test.ml22
-rw-r--r--testsuite/tests/typing-gadts/yallop_bugs.ml4
-rw-r--r--testsuite/tests/typing-immediate/immediate.ml2
-rw-r--r--testsuite/tests/typing-misc/disambiguate_principality.ml4
-rw-r--r--testsuite/tests/typing-misc/pr6416.ml34
-rw-r--r--testsuite/tests/typing-misc/pr6634.ml2
-rw-r--r--testsuite/tests/typing-misc/variant.ml4
-rw-r--r--testsuite/tests/typing-modules/Test.ml2
-rw-r--r--testsuite/tests/typing-modules/nondep_private_abbrev.ml2
-rw-r--r--testsuite/tests/typing-modules/pr6394.ml4
-rw-r--r--testsuite/tests/typing-modules/pr7818.ml4
-rw-r--r--testsuite/tests/typing-objects-bugs/pr3968_bad.compilers.reference16
-rw-r--r--testsuite/tests/typing-objects/Exemples.ml6
-rw-r--r--testsuite/tests/typing-objects/Tests.ml16
-rw-r--r--testsuite/tests/typing-objects/dummy.ml14
-rw-r--r--testsuite/tests/typing-objects/pr5619_bad.ml10
-rw-r--r--testsuite/tests/typing-poly/poly.ml12
-rw-r--r--testsuite/tests/typing-recmod/t12bad.compilers.reference6
-rw-r--r--testsuite/tests/typing-sigsubst/sigsubst.ml34
-rw-r--r--testsuite/tests/typing-unboxed-types/test.ml.flat.reference16
-rw-r--r--testsuite/tests/typing-unboxed/test.ml16
-rw-r--r--testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml2
-rw-r--r--testsuite/tests/typing-warnings/exhaustiveness.ml6
-rw-r--r--testsuite/tests/typing-warnings/pr6587.ml2
-rw-r--r--testsuite/tests/warnings/w04.compilers.reference2
-rw-r--r--testsuite/tests/warnings/w04_failure.compilers.reference12
-rw-r--r--testsuite/tests/warnings/w32.compilers.reference14
40 files changed, 215 insertions, 215 deletions
diff --git a/testsuite/tests/basic-modules/recursive_module_evaluation_errors.ml b/testsuite/tests/basic-modules/recursive_module_evaluation_errors.ml
index 760e2b7410..50bcf0e441 100644
--- a/testsuite/tests/basic-modules/recursive_module_evaluation_errors.ml
+++ b/testsuite/tests/basic-modules/recursive_module_evaluation_errors.ml
@@ -65,8 +65,8 @@ and B: sig val value: unit end = struct let value = A.f () end
[%%expect {|
Line 4, characters 6-72:
4 | ......struct
- | module F(X:sig end) = struct end
- | let f () = B.value
+5 | module F(X:sig end) = struct end
+6 | let f () = B.value
7 | end
Error: Cannot safely evaluate the definition of the following cycle
of recursively-defined modules: A -> B -> A.
@@ -95,8 +95,8 @@ end
[%%expect {|
Line 5, characters 8-62:
5 | ........struct
- | module M = X.M
- | let f () = B.value
+6 | module M = X.M
+7 | let f () = B.value
8 | end
Error: Cannot safely evaluate the definition of the following cycle
of recursively-defined modules: A -> B -> A.
diff --git a/testsuite/tests/basic-more/morematch.compilers.reference b/testsuite/tests/basic-more/morematch.compilers.reference
index 213826f123..f8857caa8d 100644
--- a/testsuite/tests/basic-more/morematch.compilers.reference
+++ b/testsuite/tests/basic-more/morematch.compilers.reference
@@ -44,8 +44,8 @@ File "morematch.ml", line 456, characters 2-7:
Warning 11: this match case is unused.
File "morematch.ml", line 1050, characters 8-65:
1050 | ........function
- | | A (`A|`C) -> 0
- | | B (`B,`D) -> 1
+1051 | | A (`A|`C) -> 0
+1052 | | B (`B,`D) -> 1
1053 | | C -> 2
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
diff --git a/testsuite/tests/basic-more/robustmatch.compilers.reference b/testsuite/tests/basic-more/robustmatch.compilers.reference
index e465d90c14..333a214da7 100644
--- a/testsuite/tests/basic-more/robustmatch.compilers.reference
+++ b/testsuite/tests/basic-more/robustmatch.compilers.reference
@@ -1,195 +1,195 @@
File "robustmatch.ml", line 33, characters 6-122:
33 | ......match t1, t2, x with
- | | AB, AB, A -> ()
- | | MAB, _, A -> ()
- | | _, AB, B -> ()
+34 | | AB, AB, A -> ()
+35 | | MAB, _, A -> ()
+36 | | _, AB, B -> ()
37 | | _, MAB, B -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(AB, MAB, A)
File "robustmatch.ml", line 54, characters 4-73:
54 | ....match r1, r2, a with
- | | R1, _, 0 -> ()
+55 | | R1, _, 0 -> ()
56 | | _, R2, "coucou" -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R1, R1, 1)
File "robustmatch.ml", line 64, characters 4-73:
64 | ....match r1, r2, a with
- | | R1, _, A -> ()
+65 | | R1, _, A -> ()
66 | | _, R2, "coucou" -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R1, R1, (B|C))
File "robustmatch.ml", line 69, characters 4-73:
69 | ....match r1, r2, a with
- | | _, R2, "coucou" -> ()
+70 | | _, R2, "coucou" -> ()
71 | | R1, _, A -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R1, R1, (B|C))
File "robustmatch.ml", line 74, characters 4-73:
74 | ....match r1, r2, a with
- | | _, R2, "coucou" -> ()
+75 | | _, R2, "coucou" -> ()
76 | | R1, _, _ -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R2, R2, "")
File "robustmatch.ml", line 85, characters 4-66:
85 | ....match r1, r2, a with
- | | R1, _, A -> ()
+86 | | R1, _, A -> ()
87 | | _, R2, X -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R1, R1, (B|C))
File "robustmatch.ml", line 90, characters 4-87:
90 | ....match r1, r2, a with
- | | R1, _, A -> ()
- | | _, R2, X -> ()
+91 | | R1, _, A -> ()
+92 | | _, R2, X -> ()
93 | | R1, _, _ -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R2, R2, (Y|Z))
File "robustmatch.ml", line 96, characters 4-66:
96 | ....match r1, r2, a with
- | | R1, _, _ -> ()
+97 | | R1, _, _ -> ()
98 | | _, R2, X -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R2, R2, (Y|Z))
File "robustmatch.ml", line 107, characters 4-66:
107 | ....match r1, r2, a with
- | | R1, _, A -> ()
+108 | | R1, _, A -> ()
109 | | _, R2, X -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R1, R1, (B|C))
File "robustmatch.ml", line 129, characters 4-66:
129 | ....match r1, r2, a with
- | | R1, _, A -> ()
+130 | | R1, _, A -> ()
131 | | _, R2, X -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R1, R1, B)
File "robustmatch.ml", line 151, characters 4-66:
151 | ....match r1, r2, a with
- | | R1, _, A -> ()
+152 | | R1, _, A -> ()
153 | | _, R2, X -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R1, R1, B)
File "robustmatch.ml", line 156, characters 4-87:
156 | ....match r1, r2, a with
- | | R1, _, A -> ()
- | | _, R2, X -> ()
+157 | | R1, _, A -> ()
+158 | | _, R2, X -> ()
159 | | R1, _, _ -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R2, R2, Y)
File "robustmatch.ml", line 162, characters 4-66:
162 | ....match r1, r2, a with
- | | R1, _, _ -> ()
+163 | | R1, _, _ -> ()
164 | | _, R2, X -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R2, R2, Y)
File "robustmatch.ml", line 167, characters 4-66:
167 | ....match r1, r2, a with
- | | R1, _, C -> ()
+168 | | R1, _, C -> ()
169 | | _, R2, Y -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R1, R1, A)
File "robustmatch.ml", line 176, characters 4-90:
176 | ....match r1, r2, a with
- | | _, R1, 0 -> ()
- | | R2, _, [||] -> ()
+177 | | _, R1, 0 -> ()
+178 | | R2, _, [||] -> ()
179 | | _, R1, 1 -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R2, R2, [| _ |])
File "robustmatch.ml", line 182, characters 4-69:
182 | ....match r1, r2, a with
- | | R1, _, _ -> ()
+183 | | R1, _, _ -> ()
184 | | _, R2, [||] -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R2, R2, [| _ |])
File "robustmatch.ml", line 187, characters 4-90:
187 | ....match r1, r2, a with
- | | _, R2, [||] -> ()
- | | R1, _, 0 -> ()
+188 | | _, R2, [||] -> ()
+189 | | R1, _, 0 -> ()
190 | | R1, _, _ -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R2, R2, [| _ |])
File "robustmatch.ml", line 200, characters 4-89:
200 | ....match r1, r2, a with
- | | _, R2, [||] -> ()
- | | R1, _, 0 -> ()
+201 | | _, R2, [||] -> ()
+202 | | R1, _, 0 -> ()
203 | | _, _, _ -> ()
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type repr.
File "robustmatch.ml", line 210, characters 4-75:
210 | ....match r1, r2, a with
- | | R1, _, 'c' -> ()
+211 | | R1, _, 'c' -> ()
212 | | _, R2, "coucou" -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R1, R1, 'a')
File "robustmatch.ml", line 219, characters 4-74:
219 | ....match r1, r2, a with
- | | R1, _, `A -> ()
+220 | | R1, _, `A -> ()
221 | | _, R2, "coucou" -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R1, R1, `B)
File "robustmatch.ml", line 228, characters 4-89:
228 | ....match r1, r2, a with
- | | R1, _, (3, "") -> ()
+229 | | R1, _, (3, "") -> ()
230 | | _, R2, (1, "coucou", 'a') -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R1, R1, (3, "*"))
File "robustmatch.ml", line 239, characters 4-113:
239 | ....match r1, r2, a with
- | | R1, _, { x = 3; y = "" } -> ()
+240 | | R1, _, { x = 3; y = "" } -> ()
241 | | _, R2, { a = 1; b = "coucou"; c = 'a' } -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R1, R1, {x=3; y="*"})
File "robustmatch.ml", line 244, characters 4-113:
244 | ....match r1, r2, a with
- | | R2, _, { a = 1; b = "coucou"; c = 'a' } -> ()
+245 | | R2, _, { a = 1; b = "coucou"; c = 'a' } -> ()
246 | | _, R1, { x = 3; y = "" } -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R2, R2, {a=1; b="coucou"; c='b'})
File "robustmatch.ml", line 253, characters 4-72:
253 | ....match r1, r2, a with
- | | R1, _, (3, "") -> ()
+254 | | R1, _, (3, "") -> ()
255 | | _, R2, 1 -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R1, R1, (3, "*"))
File "robustmatch.ml", line 263, characters 4-82:
263 | ....match r1, r2, a with
- | | R1, _, { x = 3; y = "" } -> ()
+264 | | R1, _, { x = 3; y = "" } -> ()
265 | | _, R2, 1 -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R1, R1, {x=3; y="*"})
File "robustmatch.ml", line 272, characters 4-71:
272 | ....match r1, r2, a with
- | | R1, _, lazy 1 -> ()
+273 | | R1, _, lazy 1 -> ()
274 | | _, R2, 1 -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(R1, R1, lazy 0)
File "robustmatch.ml", line 281, characters 4-99:
281 | ....match r1, r2, a with
- | | R1, _, () -> ()
- | | _, R2, "coucou" -> ()
+282 | | R1, _, () -> ()
+283 | | _, R2, "coucou" -> ()
284 | | _, R2, "foo" -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
diff --git a/testsuite/tests/basic/patmatch_incoherence.ml b/testsuite/tests/basic/patmatch_incoherence.ml
index aff7224ba0..10d38dbb1f 100644
--- a/testsuite/tests/basic/patmatch_incoherence.ml
+++ b/testsuite/tests/basic/patmatch_incoherence.ml
@@ -37,7 +37,7 @@ match { x = assert false } with
[%%expect{|
Line 1, characters 0-70:
1 | match { x = assert false } with
- | | { x = 3 } -> ()
+2 | | { x = 3 } -> ()
3 | | { x = None } -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -52,7 +52,7 @@ match { x = assert false } with
[%%expect{|
Line 1, characters 0-71:
1 | match { x = assert false } with
- | | { x = None } -> ()
+2 | | { x = None } -> ()
3 | | { x = "" } -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -67,7 +67,7 @@ match { x = assert false } with
[%%expect{|
Line 1, characters 0-71:
1 | match { x = assert false } with
- | | { x = None } -> ()
+2 | | { x = None } -> ()
3 | | { x = `X } -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -82,7 +82,7 @@ match { x = assert false } with
[%%expect{|
Line 1, characters 0-70:
1 | match { x = assert false } with
- | | { x = [||] } -> ()
+2 | | { x = [||] } -> ()
3 | | { x = 3 } -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -97,7 +97,7 @@ match { x = assert false } with
[%%expect{|
Line 1, characters 0-68:
1 | match { x = assert false } with
- | | { x = `X } -> ()
+2 | | { x = `X } -> ()
3 | | { x = 3 } -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -112,7 +112,7 @@ match { x = assert false } with
[%%expect{|
Line 1, characters 0-74:
1 | match { x = assert false } with
- | | { x = `X "lol" } -> ()
+2 | | { x = `X "lol" } -> ()
3 | | { x = 3 } -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -128,8 +128,8 @@ match { x = assert false } with
[%%expect{|
Line 1, characters 0-95:
1 | match { x = assert false } with
- | | { x = (2., "") } -> ()
- | | { x = None } -> ()
+2 | | { x = (2., "") } -> ()
+3 | | { x = None } -> ()
4 | | { x = 3 } -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
diff --git a/testsuite/tests/letrec-check/basic.ml b/testsuite/tests/letrec-check/basic.ml
index a916ce36aa..532d1fde93 100644
--- a/testsuite/tests/letrec-check/basic.ml
+++ b/testsuite/tests/letrec-check/basic.ml
@@ -174,7 +174,7 @@ and y = x; ();;
[%%expect{|
Line 2, characters 2-52:
2 | ..for i = 0 to 1 do
- | let z = y in ignore z
+3 | let z = y in ignore z
4 | done
Error: This kind of expression is not allowed as right-hand side of `let rec'
|}];;
@@ -187,7 +187,7 @@ and y = 10;;
[%%expect{|
Line 2, characters 2-33:
2 | ..for i = 0 to y do
- | ()
+3 | ()
4 | done
Error: This kind of expression is not allowed as right-hand side of `let rec'
|}];;
@@ -200,7 +200,7 @@ and y = 0;;
[%%expect{|
Line 2, characters 2-34:
2 | ..for i = y to 10 do
- | ()
+3 | ()
4 | done
Error: This kind of expression is not allowed as right-hand side of `let rec'
|}];;
@@ -213,7 +213,7 @@ and y = x; ();;
[%%expect{|
Line 2, characters 2-49:
2 | ..while false do
- | let y = x in ignore y
+3 | let y = x in ignore y
4 | done
Error: This kind of expression is not allowed as right-hand side of `let rec'
|}];;
@@ -226,7 +226,7 @@ and y = false;;
[%%expect{|
Line 2, characters 2-26:
2 | ..while y do
- | ()
+3 | ()
4 | done
Error: This kind of expression is not allowed as right-hand side of `let rec'
|}];;
@@ -239,7 +239,7 @@ and y = false;;
[%%expect{|
Line 2, characters 2-45:
2 | ..while y do
- | let y = x in ignore y
+3 | let y = x in ignore y
4 | done
Error: This kind of expression is not allowed as right-hand side of `let rec'
|}];;
@@ -322,7 +322,7 @@ and y = match x with
[%%expect{|
Line 2, characters 2-85:
2 | ..match let _ = y in raise Not_found with
- | _ -> "x"
+3 | _ -> "x"
4 | | exception Not_found -> "z"
Error: This kind of expression is not allowed as right-hand side of `let rec'
|}];;
diff --git a/testsuite/tests/letrec-check/modules.ml b/testsuite/tests/letrec-check/modules.ml
index aa2019e60b..883c49d961 100644
--- a/testsuite/tests/letrec-check/modules.ml
+++ b/testsuite/tests/letrec-check/modules.ml
@@ -39,7 +39,7 @@ let rec x =
[%%expect{|
Line 2, characters 2-74:
2 | ..let module M = struct
- | module N = struct let y = x end
+3 | module N = struct let y = x end
4 | end in M.N.y..
Error: This kind of expression is not allowed as right-hand side of `let rec'
|}];;
diff --git a/testsuite/tests/letrec-check/unboxed.ml b/testsuite/tests/letrec-check/unboxed.ml
index c048d122d9..7828472257 100644
--- a/testsuite/tests/letrec-check/unboxed.ml
+++ b/testsuite/tests/letrec-check/unboxed.ml
@@ -61,9 +61,9 @@ type a = { a : b; } [@@unboxed]
and b = X of a | Y
Line 5, characters 2-75:
5 | ..{a=
- | (if Sys.opaque_identity true then
- | X a
- | else
+6 | (if Sys.opaque_identity true then
+7 | X a
+8 | else
9 | Y)}..
Error: This kind of expression is not allowed as right-hand side of `let rec'
|}];;
@@ -101,9 +101,9 @@ type d = D of e [@@unboxed]
and e = V of d | W
Line 5, characters 2-72:
5 | ..D
- | (if Sys.opaque_identity true then
- | V d
- | else
+6 | (if Sys.opaque_identity true then
+7 | V d
+8 | else
9 | W)..
Error: This kind of expression is not allowed as right-hand side of `let rec'
|}];;
diff --git a/testsuite/tests/match-exception-warnings/exhaustiveness_warnings.ml b/testsuite/tests/match-exception-warnings/exhaustiveness_warnings.ml
index 3f603215c7..8b6bb3fd1c 100644
--- a/testsuite/tests/match-exception-warnings/exhaustiveness_warnings.ml
+++ b/testsuite/tests/match-exception-warnings/exhaustiveness_warnings.ml
@@ -18,8 +18,8 @@ let test_match_exhaustiveness () =
[%%expect{|
Line 8, characters 4-83:
8 | ....match None with
- | | exception e -> ()
- | | Some false -> ()
+ 9 | | exception e -> ()
+10 | | Some false -> ()
11 | | None -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -37,7 +37,7 @@ let test_match_exhaustiveness_nest1 () =
[%%expect{|
Line 2, characters 4-73:
2 | ....match None with
- | | Some false -> ()
+3 | | Some false -> ()
4 | | None | exception _ -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -55,7 +55,7 @@ let test_match_exhaustiveness_nest2 () =
[%%expect{|
Line 2, characters 4-73:
2 | ....match None with
- | | Some false | exception _ -> ()
+3 | | Some false | exception _ -> ()
4 | | None -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -74,8 +74,8 @@ let test_match_exhaustiveness_full () =
[%%expect{|
Line 2, characters 4-111:
2 | ....match None with
- | | exception e -> ()
- | | Some false | exception _ -> ()
+3 | | exception e -> ()
+4 | | Some false | exception _ -> ()
5 | | None | exception _ -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
diff --git a/testsuite/tests/tool-toplevel/error_highlighting.compilers.reference b/testsuite/tests/tool-toplevel/error_highlighting.compilers.reference
index 40c56a6a31..d1e221ec71 100644
--- a/testsuite/tests/tool-toplevel/error_highlighting.compilers.reference
+++ b/testsuite/tests/tool-toplevel/error_highlighting.compilers.reference
@@ -34,7 +34,7 @@ Line 2, characters 8-9:
This '(' might be unmatched
Line 2, characters 8-17:
2 | ........(1
- | +
+3 | +
4 | 2)...
Error: This expression has type int but an expression was expected of type
float
@@ -61,7 +61,7 @@ File "error_highlighting_use3.ml", line 1, characters 8-9:
This '(' might be unmatched
File "error_highlighting_use4.ml", line 1, characters 8-17:
1 | ........(1
- | +
+2 | +
3 | 2)...
Error: This expression has type int but an expression was expected of type
float
diff --git a/testsuite/tests/typing-extensions/open_types.ocaml.reference b/testsuite/tests/typing-extensions/open_types.ocaml.reference
index 2c8650af00..2dddce7ba8 100644
--- a/testsuite/tests/typing-extensions/open_types.ocaml.reference
+++ b/testsuite/tests/typing-extensions/open_types.ocaml.reference
@@ -100,8 +100,8 @@ type foo += Foo
val f : foo -> unit = <fun>
Line 4, characters 8-60:
4 | ........function
- | | [Foo] -> 1
- | | _::_::_ -> 3
+5 | | [Foo] -> 1
+6 | | _::_::_ -> 3
7 | | [] -> 2
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
diff --git a/testsuite/tests/typing-gadts/pr5785.ml b/testsuite/tests/typing-gadts/pr5785.ml
index 7419264580..96eed8fd5a 100644
--- a/testsuite/tests/typing-gadts/pr5785.ml
+++ b/testsuite/tests/typing-gadts/pr5785.ml
@@ -15,7 +15,7 @@ end;;
[%%expect{|
Line 7, characters 43-100:
7 | ...........................................function
- | | One, One -> "two"
+8 | | One, One -> "two"
9 | | Two, Two -> "four"
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
diff --git a/testsuite/tests/typing-gadts/pr5906.ml b/testsuite/tests/typing-gadts/pr5906.ml
index 3b47f51a0c..ad62ef09f8 100644
--- a/testsuite/tests/typing-gadts/pr5906.ml
+++ b/testsuite/tests/typing-gadts/pr5906.ml
@@ -29,9 +29,9 @@ type (_, _, _) binop =
| Add : (int, int, int) binop
Line 12, characters 2-195:
12 | ..match bop, x, y with
- | | Eq, Bool x, Bool y -> Bool (if x then y else not y)
- | | Leq, Int x, Int y -> Bool (x <= y)
- | | Leq, Bool x, Bool y -> Bool (x <= y)
+13 | | Eq, Bool x, Bool y -> Bool (if x then y else not y)
+14 | | Leq, Int x, Int y -> Bool (x <= y)
+15 | | Leq, Bool x, Bool y -> Bool (x <= y)
16 | | Add, Int x, Int y -> Int (x + y)
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
diff --git a/testsuite/tests/typing-gadts/pr7260.ml b/testsuite/tests/typing-gadts/pr7260.ml
index e39a1abd09..c6f160f4da 100644
--- a/testsuite/tests/typing-gadts/pr7260.ml
+++ b/testsuite/tests/typing-gadts/pr7260.ml
@@ -21,10 +21,10 @@ type _ ty = Int : int ty
type dyn = Dyn : 'a ty -> dyn
Line 7, characters 0-108:
7 | class foo =
- | object (this)
- | method foo (Dyn ty) =
- | match ty with
- | | Int -> (this :> bar)
+ 8 | object (this)
+ 9 | method foo (Dyn ty) =
+10 | match ty with
+11 | | Int -> (this :> bar)
12 | end.................................
Error: This class should be virtual.
The following methods are undefined : bar
diff --git a/testsuite/tests/typing-gadts/test.ml b/testsuite/tests/typing-gadts/test.ml
index efcdc4824c..f85ddbe120 100644
--- a/testsuite/tests/typing-gadts/test.ml
+++ b/testsuite/tests/typing-gadts/test.ml
@@ -111,7 +111,7 @@ Here is an example of a case that is not matched:
C1 _
Line 24, characters 6-77:
24 | ......function
- | | Foo _ , Foo _ -> true
+25 | | Foo _ , Foo _ -> true
26 | | Bar _, Bar _ -> true
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -918,11 +918,11 @@ let f : type a. a ty -> a t -> int = fun x y ->
[%%expect{|
Line 2, characters 2-153:
2 | ..match x, y with
- | | _, A z -> z
- | | _, B z -> if z then 1 else 2
- | | _, C z -> truncate z
- | | TE TC, D [|1.0|] -> 14
- | | TA, D 0 -> -1
+3 | | _, A z -> z
+4 | | _, B z -> if z then 1 else 2
+5 | | _, C z -> truncate z
+6 | | TE TC, D [|1.0|] -> 14
+7 | | TA, D 0 -> -1
8 | | TA, D z -> z
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -982,11 +982,11 @@ let f : type a. a ty -> a t -> int = fun x y ->
type ('a, 'b) pair = { left : 'a; right : 'b; }
Line 4, characters 2-244:
4 | ..match {left=x; right=y} with
- | | {left=_; right=A z} -> z
- | | {left=_; right=B z} -> if z then 1 else 2
- | | {left=_; right=C z} -> truncate z
- | | {left=TE TC; right=D [|1.0|]} -> 14
- | | {left=TA; right=D 0} -> -1
+ 5 | | {left=_; right=A z} -> z
+ 6 | | {left=_; right=B z} -> if z then 1 else 2
+ 7 | | {left=_; right=C z} -> truncate z
+ 8 | | {left=TE TC; right=D [|1.0|]} -> 14
+ 9 | | {left=TA; right=D 0} -> -1
10 | | {left=TA; right=D z} -> z
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
diff --git a/testsuite/tests/typing-gadts/yallop_bugs.ml b/testsuite/tests/typing-gadts/yallop_bugs.ml
index c2f43fe54a..443a65267b 100644
--- a/testsuite/tests/typing-gadts/yallop_bugs.ml
+++ b/testsuite/tests/typing-gadts/yallop_bugs.ml
@@ -58,7 +58,7 @@ let check : type s . s t * s -> bool = function
type _ t = IntLit : int t | BoolLit : bool t
Line 5, characters 39-99:
5 | .......................................function
- | | BoolLit, false -> false
+6 | | BoolLit, false -> false
7 | | IntLit , 6 -> false
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -76,7 +76,7 @@ let check : type s . (s t, s) pair -> bool = function
type ('a, 'b) pair = { fst : 'a; snd : 'b; }
Line 3, characters 45-134:
3 | .............................................function
- | | {fst = BoolLit; snd = false} -> false
+4 | | {fst = BoolLit; snd = false} -> false
5 | | {fst = IntLit ; snd = 6} -> false
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
diff --git a/testsuite/tests/typing-immediate/immediate.ml b/testsuite/tests/typing-immediate/immediate.ml
index 2f0cce46ef..285d112854 100644
--- a/testsuite/tests/typing-immediate/immediate.ml
+++ b/testsuite/tests/typing-immediate/immediate.ml
@@ -133,7 +133,7 @@ end;;
[%%expect{|
Line 1, characters 42-70:
1 | ..........................................struct
- | type t = string
+2 | type t = string
3 | end..
Error: Signature mismatch:
Modules do not match:
diff --git a/testsuite/tests/typing-misc/disambiguate_principality.ml b/testsuite/tests/typing-misc/disambiguate_principality.ml
index 41d085da1a..ed49ecbf76 100644
--- a/testsuite/tests/typing-misc/disambiguate_principality.ml
+++ b/testsuite/tests/typing-misc/disambiguate_principality.ml
@@ -496,7 +496,7 @@ let t = function
[%%expect{|
Line 1, characters 8-70:
1 | ........function
- | | ({ contents = M.A } : M.t ref) as x ->
+2 | | ({ contents = M.A } : M.t ref) as x ->
3 | x := B
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -509,7 +509,7 @@ Line 3, characters 9-10:
Warning 18: this type-based constructor disambiguation is not principal.
Line 1, characters 8-70:
1 | ........function
- | | ({ contents = M.A } : M.t ref) as x ->
+2 | | ({ contents = M.A } : M.t ref) as x ->
3 | x := B
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
diff --git a/testsuite/tests/typing-misc/pr6416.ml b/testsuite/tests/typing-misc/pr6416.ml
index b55c147dd5..a3fa4eeb01 100644
--- a/testsuite/tests/typing-misc/pr6416.ml
+++ b/testsuite/tests/typing-misc/pr6416.ml
@@ -14,8 +14,8 @@ end;;
[%%expect{|
Line 5, characters 8-52:
5 | ........struct
- | type t = B
- | let f B = ()
+6 | type t = B
+7 | let f B = ()
8 | end
Error: Signature mismatch:
Modules do not match:
@@ -69,8 +69,8 @@ end;;
[%%expect{|
Line 4, characters 4-70:
4 | ....struct
- | module type s
- | module A(X:s) =struct end
+5 | module type s
+6 | module A(X:s) =struct end
7 | end
Error: Signature mismatch:
Modules do not match:
@@ -101,8 +101,8 @@ end;;
[%%expect {|
Line 4, characters 4-77:
4 | ....struct
- | module T = struct type t end
- | type t = A of T.t
+5 | module T = struct type t end
+6 | type t = A of T.t
7 | end
Error: Signature mismatch:
Modules do not match:
@@ -189,8 +189,8 @@ end;;
[%%expect{|
Line 4, characters 2-105:
4 | ..struct
- | class a = object method c = let module X = struct type t end in () end
- | class b = a
+5 | class a = object method c = let module X = struct type t end in () end
+6 | class b = a
7 | end
Error: Signature mismatch:
Modules do not match:
@@ -221,8 +221,8 @@ end;;
[%%expect{|
Line 4, characters 2-65:
4 | ..struct
- | class type a = object end
- | class type b = a
+5 | class type a = object end
+6 | class type b = a
7 | end
Error: Signature mismatch:
Modules do not match:
@@ -268,12 +268,12 @@ end;;
[%%expect{|
Line 8, characters 6-141:
8 | ......struct
- | type t
- | class type a = object method m:t end
- | module K = struct
- | type t
- | class type c = object inherit a end
- | end
+ 9 | type t
+10 | class type a = object method m:t end
+11 | module K = struct
+12 | type t
+13 | class type c = object inherit a end
+14 | end
15 | end..
Error: Signature mismatch:
Modules do not match:
@@ -345,7 +345,7 @@ type t = C
type t = D
Line 5, characters 44-72:
5 | ............................................struct
- | let f A B C = D
+6 | let f A B C = D
7 | end..
Error: Signature mismatch:
Modules do not match:
diff --git a/testsuite/tests/typing-misc/pr6634.ml b/testsuite/tests/typing-misc/pr6634.ml
index 5d84d3772e..2faf7c989a 100644
--- a/testsuite/tests/typing-misc/pr6634.ml
+++ b/testsuite/tests/typing-misc/pr6634.ml
@@ -12,7 +12,7 @@ end;;
type t = int
Line 3, characters 0-31:
3 | struct
- | type t = [`T of t]
+4 | type t = [`T of t]
5 | end..
Error: Signature mismatch:
Modules do not match:
diff --git a/testsuite/tests/typing-misc/variant.ml b/testsuite/tests/typing-misc/variant.ml
index 32748efd92..b1dfd1c045 100644
--- a/testsuite/tests/typing-misc/variant.ml
+++ b/testsuite/tests/typing-misc/variant.ml
@@ -13,8 +13,8 @@ end;;
[%%expect{|
Line 3, characters 6-61:
3 | ......struct
- | type t = A | B
- | let f = function A | B -> 0
+4 | type t = A | B
+5 | let f = function A | B -> 0
6 | end..
Error: Signature mismatch:
Modules do not match:
diff --git a/testsuite/tests/typing-modules/Test.ml b/testsuite/tests/typing-modules/Test.ml
index 174a04f0f8..ad10f664ec 100644
--- a/testsuite/tests/typing-modules/Test.ml
+++ b/testsuite/tests/typing-modules/Test.ml
@@ -182,7 +182,7 @@ end;;
[%%expect{|
Line 3, characters 6-37:
3 | ......struct
- | type t += E of int
+4 | type t += E of int
5 | end..
Error: Signature mismatch:
Modules do not match:
diff --git a/testsuite/tests/typing-modules/nondep_private_abbrev.ml b/testsuite/tests/typing-modules/nondep_private_abbrev.ml
index c79923ff00..f0b0ec57cf 100644
--- a/testsuite/tests/typing-modules/nondep_private_abbrev.ml
+++ b/testsuite/tests/typing-modules/nondep_private_abbrev.ml
@@ -101,7 +101,7 @@ end;;
[%%expect{|
Line 3, characters 6-29:
3 | ......struct
- | type s = t
+4 | type s = t
5 | end..
Error: Signature mismatch:
Modules do not match:
diff --git a/testsuite/tests/typing-modules/pr6394.ml b/testsuite/tests/typing-modules/pr6394.ml
index a4f5cf5787..3fa0473555 100644
--- a/testsuite/tests/typing-modules/pr6394.ml
+++ b/testsuite/tests/typing-modules/pr6394.ml
@@ -12,8 +12,8 @@ end;;
[%%expect{|
Line 4, characters 6-63:
4 | ......struct
- | type t = A | B
- | let f = function A | B -> 0
+5 | type t = A | B
+6 | let f = function A | B -> 0
7 | end..
Error: Signature mismatch:
Modules do not match:
diff --git a/testsuite/tests/typing-modules/pr7818.ml b/testsuite/tests/typing-modules/pr7818.ml
index 4c41c1e6cc..6afb3e56bf 100644
--- a/testsuite/tests/typing-modules/pr7818.ml
+++ b/testsuite/tests/typing-modules/pr7818.ml
@@ -110,8 +110,8 @@ end;;
[%%expect{|
Line 2, characters 57-107:
2 | .........................................................struct
- | module Id = T'.T.Id
- | module Id2 = Id
+3 | module Id = T'.T.Id
+4 | module Id2 = Id
5 | end..
Error: Signature mismatch:
Modules do not match:
diff --git a/testsuite/tests/typing-objects-bugs/pr3968_bad.compilers.reference b/testsuite/tests/typing-objects-bugs/pr3968_bad.compilers.reference
index 25c5e6f165..dc5c531293 100644
--- a/testsuite/tests/typing-objects-bugs/pr3968_bad.compilers.reference
+++ b/testsuite/tests/typing-objects-bugs/pr3968_bad.compilers.reference
@@ -1,13 +1,13 @@
File "pr3968_bad.ml", line 20, characters 0-165:
20 | object
- | val l = e1
- | val r = e2
- | method eval env =
- | match l with
- | | `Abs(var,body) ->
- | Hashtbl.add env var r;
- | body
- | | _ -> `App(l,r);
+21 | val l = e1
+22 | val r = e2
+23 | method eval env =
+24 | match l with
+25 | | `Abs(var,body) ->
+26 | Hashtbl.add env var r;
+27 | body
+28 | | _ -> `App(l,r);
29 | end
Error: The class type
object
diff --git a/testsuite/tests/typing-objects/Exemples.ml b/testsuite/tests/typing-objects/Exemples.ml
index e516cadec0..4d8f62d928 100644
--- a/testsuite/tests/typing-objects/Exemples.ml
+++ b/testsuite/tests/typing-objects/Exemples.ml
@@ -97,9 +97,9 @@ end;;
[%%expect{|
Line 1, characters 0-95:
1 | class ref x_init = object
- | val mutable x = x_init
- | method get = x
- | method set y = x <- y
+2 | val mutable x = x_init
+3 | method get = x
+4 | method set y = x <- y
5 | end..
Error: Some type variables are unbound in this type:
class ref :
diff --git a/testsuite/tests/typing-objects/Tests.ml b/testsuite/tests/typing-objects/Tests.ml
index 22ef1a16ac..6d0d832a91 100644
--- a/testsuite/tests/typing-objects/Tests.ml
+++ b/testsuite/tests/typing-objects/Tests.ml
@@ -33,7 +33,7 @@ end;;
[%%expect{|
Line 3, characters 4-45:
3 | ....and d () = object
- | inherit ['a] c ()
+4 | inherit ['a] c ()
5 | end..
Error: Some type variables are unbound in this type:
class d : unit -> object method f : 'a -> unit end
@@ -90,7 +90,7 @@ end;;
[%%expect{|
Line 1, characters 0-48:
1 | class x () = object
- | method virtual f : int
+2 | method virtual f : int
3 | end..
Error: This class should be virtual. The following methods are undefined : f
|}];;
@@ -118,8 +118,8 @@ end;;
[%%expect{|
Line 1, characters 0-78:
1 | class ['a] c () = object
- | constraint 'a = int
- | method f x = (x : bool c)
+2 | constraint 'a = int
+3 | method f x = (x : bool c)
4 | end..
Error: The abbreviation c is used with parameters bool c
which are incompatible with constraints int c
@@ -164,7 +164,7 @@ end;;
[%%expect{|
Line 1, characters 0-50:
1 | class ['a] c () = object
- | method f = (x : 'a)
+2 | method f = (x : 'a)
3 | end..
Error: The type of this class,
class ['a] c :
@@ -620,8 +620,8 @@ end;;
[%%expect{|
Line 1, characters 0-153:
1 | class virtual ['a] matrix (sz, init : int * 'a) = object
- | val m = Array.make_matrix sz sz init
- | method add (mtx : 'a matrix) = (mtx#m.(0).(0) : 'a)
+2 | val m = Array.make_matrix sz sz init
+3 | method add (mtx : 'a matrix) = (mtx#m.(0).(0) : 'a)
4 | end..
Error: The abbreviation 'a matrix expands to type < add : 'a matrix -> 'a >
but is used with type < m : 'a array array; .. >
@@ -669,7 +669,7 @@ end);;
[%%expect{|
Line 1, characters 12-43:
1 | ............struct
- | let f (x : #c) = x
+2 | let f (x : #c) = x
3 | end......
Error: Signature mismatch:
Modules do not match:
diff --git a/testsuite/tests/typing-objects/dummy.ml b/testsuite/tests/typing-objects/dummy.ml
index b8bdde859c..842c3bf722 100644
--- a/testsuite/tests/typing-objects/dummy.ml
+++ b/testsuite/tests/typing-objects/dummy.ml
@@ -141,8 +141,8 @@ end;;
[%%expect{|
Line 4, characters 4-65:
4 | ....object
- | inherit child1 self
- | inherit child2
+5 | inherit child1 self
+6 | inherit child2
7 | end
Error: Cannot close type of object literal:
< child : '_weak1; previous : 'a option; _.. > as 'a
@@ -164,11 +164,11 @@ end;;
[%%expect{|
Line 4, characters 4-129:
4 | ....object
- | inherit child1 self
- | inherit child2
- |
- | method previous = None
- | method child = assert false
+ 5 | inherit child1 self
+ 6 | inherit child2
+ 7 |
+ 8 | method previous = None
+ 9 | method child = assert false
10 | end
Error: Cannot close type of object literal:
< child : '_weak2; previous : 'a option; _.. > as 'a
diff --git a/testsuite/tests/typing-objects/pr5619_bad.ml b/testsuite/tests/typing-objects/pr5619_bad.ml
index 2471ccba27..8cfa9066b3 100644
--- a/testsuite/tests/typing-objects/pr5619_bad.ml
+++ b/testsuite/tests/typing-objects/pr5619_bad.ml
@@ -42,11 +42,11 @@ class foo: foo_t =
[%%expect{|
Line 2, characters 2-156:
2 | ..object(self)
- | method foo = "foo"
- | method cast: type a. a name -> a =
- | function
- | Foo -> (self :> foo_t)
- | | _ -> raise Exit
+3 | method foo = "foo"
+4 | method cast: type a. a name -> a =
+5 | function
+6 | Foo -> (self :> foo_t)
+7 | | _ -> raise Exit
8 | end
Error: The class type
object method cast : 'a name -> 'a method foo : string end
diff --git a/testsuite/tests/typing-poly/poly.ml b/testsuite/tests/typing-poly/poly.ml
index 7d1c5f12c9..dfb05a52d4 100644
--- a/testsuite/tests/typing-poly/poly.ml
+++ b/testsuite/tests/typing-poly/poly.ml
@@ -40,8 +40,8 @@ match px with
[%%expect {|
Line 1, characters 0-77:
1 | match px with
- | | {pv=[]} -> "OK"
- | | {pv=5::_} -> "int"
+2 | | {pv=[]} -> "OK"
+3 | | {pv=5::_} -> "int"
4 | | {pv=true::_} -> "bool"
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -57,8 +57,8 @@ match px with
[%%expect {|
Line 1, characters 0-77:
1 | match px with
- | | {pv=[]} -> "OK"
- | | {pv=true::_} -> "bool"
+2 | | {pv=[]} -> "OK"
+3 | | {pv=true::_} -> "bool"
4 | | {pv=5::_} -> "int"
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -546,8 +546,8 @@ end
[%%expect {|
Line 4, characters 12-79:
4 | ............x =
- | match r with
- | None -> r <- Some x; x
+5 | match r with
+6 | None -> r <- Some x; x
7 | | Some y -> y
Error: This method has type 'b -> 'b which is less general than 'a. 'a -> 'a
|}];;
diff --git a/testsuite/tests/typing-recmod/t12bad.compilers.reference b/testsuite/tests/typing-recmod/t12bad.compilers.reference
index 3018d85d28..b83fdc6df8 100644
--- a/testsuite/tests/typing-recmod/t12bad.compilers.reference
+++ b/testsuite/tests/typing-recmod/t12bad.compilers.reference
@@ -1,7 +1,7 @@
File "t12bad.ml", line 11, characters 4-101:
11 | ....sig
- | class ['a] c : 'a -> object
- | method map : ('a -> 'b) -> 'b M.c
- | end
+12 | class ['a] c : 'a -> object
+13 | method map : ('a -> 'b) -> 'b M.c
+14 | end
15 | end
Error: In the definition of M.c, type 'b M.c should be 'a M.c
diff --git a/testsuite/tests/typing-sigsubst/sigsubst.ml b/testsuite/tests/typing-sigsubst/sigsubst.ml
index 52247203f7..2cf509e116 100644
--- a/testsuite/tests/typing-sigsubst/sigsubst.ml
+++ b/testsuite/tests/typing-sigsubst/sigsubst.ml
@@ -49,8 +49,8 @@ end with type M.t = int
[%%expect {|
Line 1, characters 17-115:
1 | .................sig
- | module rec M : sig type t = M2.t end
- | and M2 : sig type t = int end
+2 | module rec M : sig type t = M2.t end
+3 | and M2 : sig type t = int end
4 | end with type M.t = int
Error: In this `with' constraint, the new definition of M.t
does not match its original definition in the constrained signature:
@@ -164,9 +164,9 @@ end with type 'a t2 := 'a t * bool
type 'a t constraint 'a = 'b list
Line 2, characters 16-142:
2 | ................sig
- | type 'a t2 constraint 'a = 'b list
- | type 'a mylist = 'a list
- | val x : int mylist t2
+3 | type 'a t2 constraint 'a = 'b list
+4 | type 'a mylist = 'a list
+5 | val x : int mylist t2
6 | end with type 'a t2 := 'a t * bool
Error: Destructive substitutions are not supported for constrained
types (other than when replacing a type constructor with
@@ -269,8 +269,8 @@ end with type M.t := float
[%%expect {|
Line 1, characters 16-89:
1 | ................sig
- | module M : sig type t end
- | module A = M
+2 | module M : sig type t end
+3 | module A = M
4 | end with type M.t := float
Error: This `with' constraint on M.t changes M, which is aliased
in the constrained signature (as A).
@@ -331,8 +331,8 @@ end with type M2.t := int
module Id : functor (X : sig type t end) -> sig type t = X.t end
Line 2, characters 17-120:
2 | .................sig
- | module rec M : sig type t = A of Id(M2).t end
- | and M2 : sig type t end
+3 | module rec M : sig type t = A of Id(M2).t end
+4 | and M2 : sig type t end
5 | end with type M2.t := int
Error: This `with' constraint on M2.t makes the applicative functor
type Id(M2).t ill-typed in the constrained signature:
@@ -374,14 +374,14 @@ end with module M.N := A
[%%expect {|
Line 1, characters 16-159:
1 | ................sig
- | module M : sig
- | module N : sig
- | module P : sig
- | type t
- | end
- | end
- | end
- | module Alias = M
+ 2 | module M : sig
+ 3 | module N : sig
+ 4 | module P : sig
+ 5 | type t
+ 6 | end
+ 7 | end
+ 8 | end
+ 9 | module Alias = M
10 | end with module M.N := A
Error: This `with' constraint on M.N changes M, which is aliased
in the constrained signature (as Alias).
diff --git a/testsuite/tests/typing-unboxed-types/test.ml.flat.reference b/testsuite/tests/typing-unboxed-types/test.ml.flat.reference
index 34c844927d..9d683a2a3e 100644
--- a/testsuite/tests/typing-unboxed-types/test.ml.flat.reference
+++ b/testsuite/tests/typing-unboxed-types/test.ml.flat.reference
@@ -41,7 +41,7 @@ Line 1, characters 12-15:
Error: This kind of expression is not allowed as right-hand side of `let rec'
Line 5, characters 6-57:
5 | ......struct
- | type t = A of string [@@ocaml.unboxed]
+6 | type t = A of string [@@ocaml.unboxed]
7 | end..
Error: Signature mismatch:
Modules do not match:
@@ -56,7 +56,7 @@ Error: Signature mismatch:
the first declaration uses unboxed representation.
Line 4, characters 6-39:
4 | ......struct
- | type t = A of string
+5 | type t = A of string
6 | end..
Error: Signature mismatch:
Modules do not match:
@@ -71,7 +71,7 @@ Error: Signature mismatch:
the second declaration uses unboxed representation.
Line 4, characters 6-60:
4 | ......struct
- | type t = { f : string } [@@ocaml.unboxed]
+5 | type t = { f : string } [@@ocaml.unboxed]
6 | end..
Error: Signature mismatch:
Modules do not match:
@@ -86,7 +86,7 @@ Error: Signature mismatch:
the first declaration uses unboxed representation.
Line 4, characters 6-42:
4 | ......struct
- | type t = { f : string }
+5 | type t = { f : string }
6 | end..
Error: Signature mismatch:
Modules do not match:
@@ -101,7 +101,7 @@ Error: Signature mismatch:
the second declaration uses unboxed representation.
Line 4, characters 6-65:
4 | ......struct
- | type t = A of { f : string } [@@ocaml.unboxed]
+5 | type t = A of { f : string } [@@ocaml.unboxed]
6 | end..
Error: Signature mismatch:
Modules do not match:
@@ -116,7 +116,7 @@ Error: Signature mismatch:
the first declaration uses unboxed representation.
Line 4, characters 6-47:
4 | ......struct
- | type t = A of { f : string }
+5 | type t = A of { f : string }
6 | end..
Error: Signature mismatch:
Modules do not match:
@@ -151,8 +151,8 @@ Error: This type cannot be unboxed because
You should annotate it with [@@ocaml.boxed].
Line 7, characters 6-86:
7 | ......struct
- | type t = A of float [@@ocaml.unboxed]
- | type u = { f1 : t; f2 : t }
+ 8 | type t = A of float [@@ocaml.unboxed]
+ 9 | type u = { f1 : t; f2 : t }
10 | end..
Error: Signature mismatch:
...
diff --git a/testsuite/tests/typing-unboxed/test.ml b/testsuite/tests/typing-unboxed/test.ml
index a252942cd9..a85ec93df8 100644
--- a/testsuite/tests/typing-unboxed/test.ml
+++ b/testsuite/tests/typing-unboxed/test.ml
@@ -108,7 +108,7 @@ end;;
[%%expect{|
Line 3, characters 6-70:
3 | ......struct
- | external f : int -> (int [@untagged]) = "f" "f_nat"
+4 | external f : int -> (int [@untagged]) = "f" "f_nat"
5 | end..
Error: Signature mismatch:
Modules do not match:
@@ -130,7 +130,7 @@ end;;
[%%expect{|
Line 3, characters 6-70:
3 | ......struct
- | external f : (int [@untagged]) -> int = "f" "f_nat"
+4 | external f : (int [@untagged]) -> int = "f" "f_nat"
5 | end..
Error: Signature mismatch:
Modules do not match:
@@ -152,7 +152,7 @@ end;;
[%%expect{|
Line 3, characters 6-73:
3 | ......struct
- | external f : float -> (float [@unboxed]) = "f" "f_nat"
+4 | external f : float -> (float [@unboxed]) = "f" "f_nat"
5 | end..
Error: Signature mismatch:
Modules do not match:
@@ -174,7 +174,7 @@ end;;
[%%expect{|
Line 3, characters 6-73:
3 | ......struct
- | external f : (float [@unboxed]) -> float = "f" "f_nat"
+4 | external f : (float [@unboxed]) -> float = "f" "f_nat"
5 | end..
Error: Signature mismatch:
Modules do not match:
@@ -198,7 +198,7 @@ end;;
[%%expect{|
Line 3, characters 6-56:
3 | ......struct
- | external f : int -> int = "f" "f_nat"
+4 | external f : int -> int = "f" "f_nat"
5 | end..
Error: Signature mismatch:
Modules do not match:
@@ -220,7 +220,7 @@ end;;
[%%expect{|
Line 3, characters 6-56:
3 | ......struct
- | external f : int -> int = "a" "a_nat"
+4 | external f : int -> int = "a" "a_nat"
5 | end..
Error: Signature mismatch:
Modules do not match:
@@ -242,7 +242,7 @@ end;;
[%%expect{|
Line 3, characters 6-60:
3 | ......struct
- | external f : float -> float = "f" "f_nat"
+4 | external f : float -> float = "f" "f_nat"
5 | end..
Error: Signature mismatch:
Modules do not match:
@@ -264,7 +264,7 @@ end;;
[%%expect{|
Line 3, characters 6-60:
3 | ......struct
- | external f : float -> float = "a" "a_nat"
+4 | external f : float -> float = "a" "a_nat"
5 | end..
Error: Signature mismatch:
Modules do not match:
diff --git a/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml b/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml
index 6cd37a6e30..3a8d5a0159 100644
--- a/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml
+++ b/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml
@@ -367,7 +367,7 @@ Warning 41: A belongs to several types: t2 t
The first one was selected. Please disambiguate if this is wrong.
Line 1, characters 41-137:
1 | .........................................function
- | | 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
+2 | | 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
3 | | _ -> 2
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t2.
diff --git a/testsuite/tests/typing-warnings/exhaustiveness.ml b/testsuite/tests/typing-warnings/exhaustiveness.ml
index 8787eb7b38..35b10046ad 100644
--- a/testsuite/tests/typing-warnings/exhaustiveness.ml
+++ b/testsuite/tests/typing-warnings/exhaustiveness.ml
@@ -10,7 +10,7 @@ let f = function
[%%expect {|
Line 1, characters 8-60:
1 | ........function
- | None, None -> 1
+2 | None, None -> 1
3 | | Some _, Some _ -> 2..
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
@@ -360,8 +360,8 @@ let f = function
[%%expect {|
Line 1, characters 8-88:
1 | ........function
- | | None -> ()
- | | Some x when x > 0 -> ()
+2 | | None -> ()
+3 | | Some x when x > 0 -> ()
4 | | Some x when x <= 0 -> ()
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
diff --git a/testsuite/tests/typing-warnings/pr6587.ml b/testsuite/tests/typing-warnings/pr6587.ml
index 971524341c..ed7ade4434 100644
--- a/testsuite/tests/typing-warnings/pr6587.ml
+++ b/testsuite/tests/typing-warnings/pr6587.ml
@@ -25,7 +25,7 @@ module B: sig val f: fpclass -> fpclass end =
[%%expect {|
Line 2, characters 2-38:
2 | ..struct
- | let f A = FP_normal
+3 | let f A = FP_normal
4 | end
Error: Signature mismatch:
Modules do not match:
diff --git a/testsuite/tests/warnings/w04.compilers.reference b/testsuite/tests/warnings/w04.compilers.reference
index ed8faa11ca..3f091a3926 100644
--- a/testsuite/tests/warnings/w04.compilers.reference
+++ b/testsuite/tests/warnings/w04.compilers.reference
@@ -1,6 +1,6 @@
File "w04.ml", line 21, characters 10-40:
21 | ..........match x with
- | | A -> 0
+22 | | A -> 0
23 | | _ -> 1
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type t.
diff --git a/testsuite/tests/warnings/w04_failure.compilers.reference b/testsuite/tests/warnings/w04_failure.compilers.reference
index 88498ce04e..e833d2bbb8 100644
--- a/testsuite/tests/warnings/w04_failure.compilers.reference
+++ b/testsuite/tests/warnings/w04_failure.compilers.reference
@@ -1,21 +1,21 @@
File "w04_failure.ml", line 20, characters 2-78:
20 | ..match r1, r2, t with
- | | AB, _, A -> ()
- | | _, XY, X -> ()
+21 | | AB, _, A -> ()
+22 | | _, XY, X -> ()
23 | | _, _, _ -> ()
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type repr.
File "w04_failure.ml", line 20, characters 2-78:
20 | ..match r1, r2, t with
- | | AB, _, A -> ()
- | | _, XY, X -> ()
+21 | | AB, _, A -> ()
+22 | | _, XY, X -> ()
23 | | _, _, _ -> ()
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type ab.
File "w04_failure.ml", line 20, characters 2-78:
20 | ..match r1, r2, t with
- | | AB, _, A -> ()
- | | _, XY, X -> ()
+21 | | AB, _, A -> ()
+22 | | _, XY, X -> ()
23 | | _, _, _ -> ()
Warning 4: this pattern-matching is fragile.
It will remain exhaustive when constructors are added to type xy.
diff --git a/testsuite/tests/warnings/w32.compilers.reference b/testsuite/tests/warnings/w32.compilers.reference
index 85e2f01227..e1d5fdbd77 100644
--- a/testsuite/tests/warnings/w32.compilers.reference
+++ b/testsuite/tests/warnings/w32.compilers.reference
@@ -48,13 +48,13 @@ File "w32.ml", line 59, characters 22-23:
Warning 32: unused value k.
File "w32.ml", line 52, characters 0-174:
52 | module M = struct
- | [@@@warning "-32"]
- | let f x = x
- | let[@warning "+32"] g x = x
- | let[@warning "+32"] h x = x
- | and i x = x
- | let j x = x
- | and[@warning "+32"] k x = x
+53 | [@@@warning "-32"]
+54 | let f x = x
+55 | let[@warning "+32"] g x = x
+56 | let[@warning "+32"] h x = x
+57 | and i x = x
+58 | let j x = x
+59 | and[@warning "+32"] k x = x
60 | end
Warning 60: unused module M.
File "w32.ml", line 63, characters 18-29: