From db913818a6a96688e501835f11f0a4d00c37b91b Mon Sep 17 00:00:00 2001 From: Gabriel Scherer Date: Tue, 21 Feb 2023 10:06:32 +0100 Subject: update testsuite --- .../tests/basic-more/morematch.compilers.reference | 13 ++++++++ .../basic-more/robustmatch.compilers.reference | 27 +++++++++++++++ testsuite/tests/let-syntax/let_syntax.ml | 1 + .../tests/letrec-check/pr7231.ocaml.reference | 1 + testsuite/tests/lexing/escape.ocaml.reference | 3 ++ testsuite/tests/lexing/uchar_esc.ocaml.reference | 2 ++ .../exhaustiveness_warnings.ml | 2 ++ .../no-alias-deps/aliases.compilers.reference | 1 + .../parsetree/locations_test.compilers.reference | 1 + testsuite/tests/parsing/change_start_loc.reference | 1 + testsuite/tests/tmc/other_features.ml | 2 ++ .../tmc/tupled_function_calls.native.reference | 2 ++ testsuite/tests/tmc/usage_warnings.ml | 5 +++ .../tool-ocamlc-open-error.compilers.reference | 1 + .../tests/tool-toplevel/pr6468.compilers.reference | 1 + .../tests/tool-toplevel/pr7060.compilers.reference | 1 + testsuite/tests/typing-deprecated/alerts.ml | 9 +++++ testsuite/tests/typing-deprecated/deprecated.ml | 5 +++ testsuite/tests/typing-gadts/pr5785.ml | 1 + testsuite/tests/typing-gadts/pr5906.ml | 1 + testsuite/tests/typing-gadts/pr6241.ml | 1 + testsuite/tests/typing-gadts/pr6993_bad.ml | 1 + testsuite/tests/typing-gadts/pr7390.ml | 1 + testsuite/tests/typing-gadts/pr7432.ml | 1 + testsuite/tests/typing-gadts/pr9759.ml | 1 + .../tests/typing-gadts/principality-and-gadts.ml | 3 ++ testsuite/tests/typing-gadts/test.ml | 2 ++ .../tests/typing-misc/disambiguate_principality.ml | 7 ++++ testsuite/tests/typing-misc/polyvars.ml | 2 ++ .../tests/typing-misc/pr6939-flat-float-array.ml | 1 + testsuite/tests/typing-objects/Tests.ml | 3 ++ testsuite/tests/typing-polyvariants-bugs/pr7824.ml | 1 + .../private.compilers.principal.reference | 1 + .../typing-private/private.compilers.reference | 1 + .../typing-safe-linking/b_bad.compilers.reference | 1 + testsuite/tests/typing-unboxed/test.ml | 4 +++ .../ambiguous_guarded_disjunction.ml | 6 ++++ testsuite/tests/typing-warnings/exhaustiveness.ml | 1 + testsuite/tests/typing-warnings/open_warnings.ml | 12 +++++++ testsuite/tests/typing-warnings/pr5892.ml | 1 + testsuite/tests/typing-warnings/pr6872.ml | 2 ++ testsuite/tests/typing-warnings/pr7115.ml | 1 + .../typing-warnings/pr7261.compilers.reference | 1 + testsuite/tests/typing-warnings/pr7297.ml | 1 + testsuite/tests/typing-warnings/pr7553.ml | 1 + testsuite/tests/typing-warnings/records.ml | 38 ++++++++++++++++++++++ .../tests/typing-warnings/unused_recmodule.ml | 1 + testsuite/tests/typing-warnings/unused_types.ml | 4 +++ .../warnings/deprecated_module.compilers.reference | 1 + ...deprecated_module_assigment.compilers.reference | 10 ++++++ .../deprecated_module_use.compilers.reference | 4 +++ testsuite/tests/warnings/w01.compilers.reference | 5 +++ testsuite/tests/warnings/w03.compilers.reference | 1 + .../tests/warnings/w04_failure.compilers.reference | 2 ++ testsuite/tests/warnings/w06.compilers.reference | 1 + testsuite/tests/warnings/w32.compilers.reference | 17 ++++++++++ testsuite/tests/warnings/w32b.compilers.reference | 1 + testsuite/tests/warnings/w33.compilers.reference | 2 ++ testsuite/tests/warnings/w45.compilers.reference | 2 ++ .../tests/warnings/w47_inline.compilers.reference | 8 +++++ testsuite/tests/warnings/w50.compilers.reference | 1 + testsuite/tests/warnings/w53.compilers.reference | 16 +++++++++ testsuite/tests/warnings/w54.compilers.reference | 3 ++ testsuite/tests/warnings/w55.flambda.reference | 2 ++ testsuite/tests/warnings/w55.native.reference | 5 +++ testsuite/tests/warnings/w59.flambda.reference | 4 +++ testsuite/tests/warnings/w68.compilers.reference | 1 + 67 files changed, 266 insertions(+) (limited to 'testsuite') diff --git a/testsuite/tests/basic-more/morematch.compilers.reference b/testsuite/tests/basic-more/morematch.compilers.reference index ce9a2d3131..49d5cbb07f 100644 --- a/testsuite/tests/basic-more/morematch.compilers.reference +++ b/testsuite/tests/basic-more/morematch.compilers.reference @@ -2,46 +2,57 @@ File "morematch.ml", line 67, characters 2-5: 67 | | 4|5|7 -> 100 ^^^ Warning 12 [redundant-subpat]: this sub-pattern is unused. + File "morematch.ml", line 68, characters 2-3: 68 | | 7 | 8 -> 6 ^ Warning 12 [redundant-subpat]: this sub-pattern is unused. + File "morematch.ml", line 219, characters 33-47: 219 | let f = function (([]|[_]) as x)|(_::([] as x))|(_::_::x) -> x ^^^^^^^^^^^^^^ Warning 12 [redundant-subpat]: this sub-pattern is unused. + File "morematch.ml", line 388, characters 2-15: 388 | | A,_,(100|103) -> 5 ^^^^^^^^^^^^^ Warning 11 [redundant-case]: this match case is unused. + File "morematch.ml", line 401, characters 2-20: 401 | | [],_,(100|103|104) -> 5 ^^^^^^^^^^^^^^^^^^ Warning 11 [redundant-case]: this match case is unused. + File "morematch.ml", line 402, characters 2-16: 402 | | [],_,(100|103) -> 6 ^^^^^^^^^^^^^^ Warning 11 [redundant-case]: this match case is unused. + File "morematch.ml", line 403, characters 2-29: 403 | | [],_,(1000|1001|1002|20000) -> 7 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 11 [redundant-case]: this match case is unused. + File "morematch.ml", line 413, characters 5-12: 413 | | (100|103|101) -> 2 ^^^^^^^ Warning 12 [redundant-subpat]: this sub-pattern is unused. + File "morematch.ml", line 432, characters 43-44: 432 | | (J,J,((C|D) as x |E x|F (_,x))) | (J,_,((C|J) as x)) -> autre (x,x,x) ^ Warning 12 [redundant-subpat]: this sub-pattern is unused. + File "morematch.ml", line 455, characters 7-8: 455 | | _,_,(X|U _) -> 8 ^ Warning 12 [redundant-subpat]: this sub-pattern is unused. + File "morematch.ml", line 456, characters 2-7: 456 | | _,_,Y -> 5 ^^^^^ Warning 11 [redundant-case]: this match case is unused. + File "morematch.ml", lines 1050-1053, characters 8-10: 1050 | ........function 1051 | | A (`A|`C) -> 0 @@ -50,10 +61,12 @@ File "morematch.ml", lines 1050-1053, characters 8-10: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: A `D + File "morematch.ml", line 1084, characters 5-51: 1084 | | _, _, _, _, _, A, _, _, _, _, B, _, _, _, _, _ -> "11" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 11 [redundant-case]: this match case is unused. + File "morematch.ml", line 1086, characters 5-51: 1086 | | _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ -> "13" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/basic-more/robustmatch.compilers.reference b/testsuite/tests/basic-more/robustmatch.compilers.reference index 241b7395ab..f213748f33 100644 --- a/testsuite/tests/basic-more/robustmatch.compilers.reference +++ b/testsuite/tests/basic-more/robustmatch.compilers.reference @@ -7,6 +7,7 @@ File "robustmatch.ml", lines 33-37, characters 6-23: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (AB, MAB, A) + File "robustmatch.ml", lines 43-47, characters 4-21: 43 | ....match t1, t2, x with 44 | | AB, AB, A -> () @@ -16,6 +17,7 @@ File "robustmatch.ml", lines 43-47, characters 4-21: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (AB, MAB, A) + File "robustmatch.ml", lines 54-56, characters 4-27: 54 | ....match r1, r2, a with 55 | | R1, _, 0 -> () @@ -23,6 +25,7 @@ File "robustmatch.ml", lines 54-56, characters 4-27: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R1, R1, 1) + File "robustmatch.ml", lines 64-66, characters 4-27: 64 | ....match r1, r2, a with 65 | | R1, _, A -> () @@ -30,6 +33,7 @@ File "robustmatch.ml", lines 64-66, characters 4-27: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R1, R1, (B|C)) + File "robustmatch.ml", lines 69-71, characters 4-20: 69 | ....match r1, r2, a with 70 | | _, R2, "coucou" -> () @@ -37,6 +41,7 @@ File "robustmatch.ml", lines 69-71, characters 4-20: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R1, R1, (B|C)) + File "robustmatch.ml", lines 74-76, characters 4-20: 74 | ....match r1, r2, a with 75 | | _, R2, "coucou" -> () @@ -44,6 +49,7 @@ File "robustmatch.ml", lines 74-76, characters 4-20: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R2, R2, "") + File "robustmatch.ml", lines 85-87, characters 4-20: 85 | ....match r1, r2, a with 86 | | R1, _, A -> () @@ -51,6 +57,7 @@ File "robustmatch.ml", lines 85-87, characters 4-20: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R1, R1, (B|C)) + File "robustmatch.ml", lines 90-93, characters 4-20: 90 | ....match r1, r2, a with 91 | | R1, _, A -> () @@ -59,6 +66,7 @@ File "robustmatch.ml", lines 90-93, characters 4-20: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R2, R2, (Y|Z)) + File "robustmatch.ml", lines 96-98, characters 4-20: 96 | ....match r1, r2, a with 97 | | R1, _, _ -> () @@ -66,6 +74,7 @@ File "robustmatch.ml", lines 96-98, characters 4-20: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R2, R2, (Y|Z)) + File "robustmatch.ml", lines 107-109, characters 4-20: 107 | ....match r1, r2, a with 108 | | R1, _, A -> () @@ -73,6 +82,7 @@ File "robustmatch.ml", lines 107-109, characters 4-20: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R1, R1, (B|C)) + File "robustmatch.ml", lines 129-131, characters 4-20: 129 | ....match r1, r2, a with 130 | | R1, _, A -> () @@ -80,6 +90,7 @@ File "robustmatch.ml", lines 129-131, characters 4-20: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R1, R1, B) + File "robustmatch.ml", lines 151-153, characters 4-20: 151 | ....match r1, r2, a with 152 | | R1, _, A -> () @@ -87,6 +98,7 @@ File "robustmatch.ml", lines 151-153, characters 4-20: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R1, R1, B) + File "robustmatch.ml", lines 156-159, characters 4-20: 156 | ....match r1, r2, a with 157 | | R1, _, A -> () @@ -95,6 +107,7 @@ File "robustmatch.ml", lines 156-159, characters 4-20: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R2, R2, Y) + File "robustmatch.ml", lines 162-164, characters 4-20: 162 | ....match r1, r2, a with 163 | | R1, _, _ -> () @@ -102,6 +115,7 @@ File "robustmatch.ml", lines 162-164, characters 4-20: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R2, R2, Y) + File "robustmatch.ml", lines 167-169, characters 4-20: 167 | ....match r1, r2, a with 168 | | R1, _, C -> () @@ -109,6 +123,7 @@ File "robustmatch.ml", lines 167-169, characters 4-20: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R1, R1, A) + File "robustmatch.ml", lines 176-179, characters 4-20: 176 | ....match r1, r2, a with 177 | | _, R1, 0 -> () @@ -117,6 +132,7 @@ File "robustmatch.ml", lines 176-179, characters 4-20: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R2, R2, [| _ |]) + File "robustmatch.ml", lines 182-184, characters 4-23: 182 | ....match r1, r2, a with 183 | | R1, _, _ -> () @@ -124,6 +140,7 @@ File "robustmatch.ml", lines 182-184, characters 4-23: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R2, R2, [| _ |]) + File "robustmatch.ml", lines 187-190, characters 4-20: 187 | ....match r1, r2, a with 188 | | _, R2, [||] -> () @@ -132,6 +149,7 @@ File "robustmatch.ml", lines 187-190, characters 4-20: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R2, R2, [| _ |]) + File "robustmatch.ml", lines 200-203, characters 4-19: 200 | ....match r1, r2, a with 201 | | _, R2, [||] -> () @@ -139,6 +157,7 @@ File "robustmatch.ml", lines 200-203, characters 4-19: 203 | | _, _, _ -> () Warning 4 [fragile-match]: this pattern-matching is fragile. It will remain exhaustive when constructors are added to type repr. + File "robustmatch.ml", lines 210-212, characters 4-27: 210 | ....match r1, r2, a with 211 | | R1, _, 'c' -> () @@ -146,6 +165,7 @@ File "robustmatch.ml", lines 210-212, characters 4-27: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R1, R1, 'a') + File "robustmatch.ml", lines 219-221, characters 4-27: 219 | ....match r1, r2, a with 220 | | R1, _, `A -> () @@ -153,6 +173,7 @@ File "robustmatch.ml", lines 219-221, characters 4-27: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R1, R1, `B) + File "robustmatch.ml", lines 228-230, characters 4-37: 228 | ....match r1, r2, a with 229 | | R1, _, (3, "") -> () @@ -160,6 +181,7 @@ File "robustmatch.ml", lines 228-230, characters 4-37: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R1, R1, (3, "*")) + File "robustmatch.ml", lines 239-241, characters 4-51: 239 | ....match r1, r2, a with 240 | | R1, _, { x = 3; y = "" } -> () @@ -167,6 +189,7 @@ File "robustmatch.ml", lines 239-241, characters 4-51: Warning 8 [partial-match]: 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", lines 244-246, characters 4-36: 244 | ....match r1, r2, a with 245 | | R2, _, { a = 1; b = "coucou"; c = 'a' } -> () @@ -174,6 +197,7 @@ File "robustmatch.ml", lines 244-246, characters 4-36: Warning 8 [partial-match]: 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", lines 253-255, characters 4-20: 253 | ....match r1, r2, a with 254 | | R1, _, (3, "") -> () @@ -181,6 +205,7 @@ File "robustmatch.ml", lines 253-255, characters 4-20: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R1, R1, (3, "*")) + File "robustmatch.ml", lines 263-265, characters 4-20: 263 | ....match r1, r2, a with 264 | | R1, _, { x = 3; y = "" } -> () @@ -188,6 +213,7 @@ File "robustmatch.ml", lines 263-265, characters 4-20: Warning 8 [partial-match]: 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", lines 272-274, characters 4-20: 272 | ....match r1, r2, a with 273 | | R1, _, lazy 1 -> () @@ -195,6 +221,7 @@ File "robustmatch.ml", lines 272-274, characters 4-20: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (R1, R1, lazy 0) + File "robustmatch.ml", lines 281-284, characters 4-24: 281 | ....match r1, r2, a with 282 | | R1, _, () -> () diff --git a/testsuite/tests/let-syntax/let_syntax.ml b/testsuite/tests/let-syntax/let_syntax.ml index 1cdffca816..556acdf17c 100644 --- a/testsuite/tests/let-syntax/let_syntax.ml +++ b/testsuite/tests/let-syntax/let_syntax.ml @@ -720,6 +720,7 @@ Line 4, characters 11-19: ^^^^^^^^ Warning 18 [not-principal]: typing this pattern requires considering GADT_ordering.point and a as equal. But the knowledge of these types is not principal. + Line 5, characters 11-19: 5 | and+ { x; y } = a in ^^^^^^^^ diff --git a/testsuite/tests/letrec-check/pr7231.ocaml.reference b/testsuite/tests/letrec-check/pr7231.ocaml.reference index 5257588c72..5e370c5c83 100644 --- a/testsuite/tests/letrec-check/pr7231.ocaml.reference +++ b/testsuite/tests/letrec-check/pr7231.ocaml.reference @@ -2,6 +2,7 @@ Line 5, characters 58-64: 5 | let rec r = let rec x () = r and y () = x () in y () in r "oops";; ^^^^^^ Warning 20 [ignored-extra-argument]: this argument will not be used by the function. + Line 5, characters 12-52: 5 | let rec r = let rec x () = r and y () = x () in y () in r "oops";; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/lexing/escape.ocaml.reference b/testsuite/tests/lexing/escape.ocaml.reference index 9cfb56141e..fe53e3d982 100644 --- a/testsuite/tests/lexing/escape.ocaml.reference +++ b/testsuite/tests/lexing/escape.ocaml.reference @@ -5,6 +5,7 @@ Warning 14 [illegal-backslash]: illegal backslash escape in string. Hint: Single backslashes \ are reserved for escape sequences (\n, \r, ...). Did you check the list of OCaml escape sequences? To get a backslash character, escape it with a second backslash: \\. + val invalid : string = "\\99" Line 1, characters 15-19: 1 | let invalid = "\999" ;; @@ -21,6 +22,7 @@ Warning 14 [illegal-backslash]: illegal backslash escape in string. Hint: Single backslashes \ are reserved for escape sequences (\n, \r, ...). Did you check the list of OCaml escape sequences? To get a backslash character, escape it with a second backslash: \\. + val invalid : string = "\\o77" Line 1, characters 15-17: 1 | let invalid = "\o99" ;; @@ -29,5 +31,6 @@ Warning 14 [illegal-backslash]: illegal backslash escape in string. Hint: Single backslashes \ are reserved for escape sequences (\n, \r, ...). Did you check the list of OCaml escape sequences? To get a backslash character, escape it with a second backslash: \\. + val invalid : string = "\\o99" diff --git a/testsuite/tests/lexing/uchar_esc.ocaml.reference b/testsuite/tests/lexing/uchar_esc.ocaml.reference index d16cae72df..c4133193d4 100644 --- a/testsuite/tests/lexing/uchar_esc.ocaml.reference +++ b/testsuite/tests/lexing/uchar_esc.ocaml.reference @@ -29,6 +29,7 @@ Warning 14 [illegal-backslash]: illegal backslash escape in string. Hint: Single backslashes \ are reserved for escape sequences (\n, \r, ...). Did you check the list of OCaml escape sequences? To get a backslash character, escape it with a second backslash: \\. + val no_hex_digits : string = "\\u{}" Line 1, characters 25-27: 1 | let illegal_hex_digit = "\u{u}" ;; @@ -37,5 +38,6 @@ Warning 14 [illegal-backslash]: illegal backslash escape in string. Hint: Single backslashes \ are reserved for escape sequences (\n, \r, ...). Did you check the list of OCaml escape sequences? To get a backslash character, escape it with a second backslash: \\. + val illegal_hex_digit : string = "\\u{u}" diff --git a/testsuite/tests/match-exception-warnings/exhaustiveness_warnings.ml b/testsuite/tests/match-exception-warnings/exhaustiveness_warnings.ml index d6bcd397ca..c96bb2c049 100644 --- a/testsuite/tests/match-exception-warnings/exhaustiveness_warnings.ml +++ b/testsuite/tests/match-exception-warnings/exhaustiveness_warnings.ml @@ -80,10 +80,12 @@ Lines 2-5, characters 4-30: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: Some true + Line 4, characters 29-30: 4 | | Some false | exception _ -> () ^ Warning 11 [redundant-case]: this match case is unused. + Line 5, characters 23-24: 5 | | None | exception _ -> () ^ diff --git a/testsuite/tests/no-alias-deps/aliases.compilers.reference b/testsuite/tests/no-alias-deps/aliases.compilers.reference index 5e421986cd..7cbb52c1d8 100644 --- a/testsuite/tests/no-alias-deps/aliases.compilers.reference +++ b/testsuite/tests/no-alias-deps/aliases.compilers.reference @@ -2,6 +2,7 @@ File "aliases.ml", line 17, characters 12-13: 17 | module A' = A (* missing a.cmi *) ^ Warning 49 [no-cmi-file]: no cmi file was found in path for module A + File "aliases.ml", line 18, characters 12-13: 18 | module B' = B (* broken b.cmi *) ^ diff --git a/testsuite/tests/parsetree/locations_test.compilers.reference b/testsuite/tests/parsetree/locations_test.compilers.reference index 054a7db232..b5b89d7486 100644 --- a/testsuite/tests/parsetree/locations_test.compilers.reference +++ b/testsuite/tests/parsetree/locations_test.compilers.reference @@ -643,6 +643,7 @@ Line 2, characters 12-13: 2 | let x = M.( 3; 4 );; ^ Warning 10 [non-unit-statement]: this expression should have type unit. + val x : int = 4 Ptop_def [ diff --git a/testsuite/tests/parsing/change_start_loc.reference b/testsuite/tests/parsing/change_start_loc.reference index 43506af62a..30a5937068 100644 --- a/testsuite/tests/parsing/change_start_loc.reference +++ b/testsuite/tests/parsing/change_start_loc.reference @@ -2,5 +2,6 @@ Incomplete version: File "file.ml", line 100, characters 10--999: Error: Syntax error Good version: + File "file.ml", line 100, characters 10-11: Error: Syntax error diff --git a/testsuite/tests/tmc/other_features.ml b/testsuite/tests/tmc/other_features.ml index b880c0335e..8654a6923e 100644 --- a/testsuite/tests/tmc/other_features.ml +++ b/testsuite/tests/tmc/other_features.ml @@ -23,10 +23,12 @@ Lines 6-11, characters 30-40: 11 | C (map' a, (map' [@tailcall]) b) Warning 71 [unused-tmc-attribute]: This function is marked @tail_mod_cons but is never applied in TMC position. + Line 11, characters 19-39: 11 | C (map' a, (map' [@tailcall]) b) ^^^^^^^^^^^^^^^^^^^^ Warning 51 [wrong-tailcall-expectation]: expected tailcall + Line 11, characters 19-39: 11 | C (map' a, (map' [@tailcall]) b) ^^^^^^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/tmc/tupled_function_calls.native.reference b/testsuite/tests/tmc/tupled_function_calls.native.reference index 26d123bf5a..27c794ba5d 100644 --- a/testsuite/tests/tmc/tupled_function_calls.native.reference +++ b/testsuite/tests/tmc/tupled_function_calls.native.reference @@ -7,10 +7,12 @@ File "tupled_function_calls.ml", lines 16-21, characters 46-57: 21 | f x :: (tupled_map_not_direct[@tailcall true]) pair Warning 71 [unused-tmc-attribute]: This function is marked @tail_mod_cons but is never applied in TMC position. + File "tupled_function_calls.ml", line 21, characters 13-57: 21 | f x :: (tupled_map_not_direct[@tailcall true]) pair ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 51 [wrong-tailcall-expectation]: expected tailcall + File "tupled_function_calls.ml", line 21, characters 13-57: 21 | f x :: (tupled_map_not_direct[@tailcall true]) pair ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/tmc/usage_warnings.ml b/testsuite/tests/tmc/usage_warnings.ml index b82487510c..e39fe21dfd 100644 --- a/testsuite/tests/tmc/usage_warnings.ml +++ b/testsuite/tests/tmc/usage_warnings.ml @@ -25,6 +25,7 @@ so the call will not be transformed into a tail call. Please either mark the called function with the [@tail_mod_cons] attribute, or mark this call with the [@tailcall false] attribute to make its non-tailness explicit. + Lines 1-3, characters 34-40: 1 | ..................................function 2 | | [] -> [] @@ -69,6 +70,7 @@ so the call will not be transformed into a tail call. Please either mark the called function with the [@tail_mod_cons] attribute, or mark this call with the [@tailcall false] attribute to make its non-tailness explicit. + Lines 1-10, characters 34-30: 1 | ..................................function 2 | | [] -> [] @@ -250,14 +252,17 @@ so the call will not be transformed into a tail call. Please either mark the called function with the [@tail_mod_cons] attribute, or mark this call with the [@tailcall false] attribute to make its non-tailness explicit. + Line 17, characters 17-67: 17 | else Tau ((graft[@tailcall]) (* this should also warn *) n) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 51 [wrong-tailcall-expectation]: expected tailcall + Line 16, characters 13-56: 16 | then (graft[@tailcall]) (* this should warn *) n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 51 [wrong-tailcall-expectation]: expected tailcall + Line 17, characters 17-67: 17 | else Tau ((graft[@tailcall]) (* this should also warn *) n) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/tool-ocamlc-open/tool-ocamlc-open-error.compilers.reference b/testsuite/tests/tool-ocamlc-open/tool-ocamlc-open-error.compilers.reference index dcf6f4f96d..0581688a76 100644 --- a/testsuite/tests/tool-ocamlc-open/tool-ocamlc-open-error.compilers.reference +++ b/testsuite/tests/tool-ocamlc-open/tool-ocamlc-open-error.compilers.reference @@ -1,4 +1,5 @@ File "tool-ocamlc-open-error.ml", line 1: Warning 24 [bad-module-name]: bad source file name: "Tool-ocamlc-open-error" is not a valid module name. + File "command line argument: -open "F("", line 1, characters 1-2: Error: Syntax error diff --git a/testsuite/tests/tool-toplevel/pr6468.compilers.reference b/testsuite/tests/tool-toplevel/pr6468.compilers.reference index 3b1e163a06..df9027181d 100644 --- a/testsuite/tests/tool-toplevel/pr6468.compilers.reference +++ b/testsuite/tests/tool-toplevel/pr6468.compilers.reference @@ -4,6 +4,7 @@ Line 1, characters 11-15: 1 | let g () = f (); 1;; ^^^^ Warning 21 [nonreturning-statement]: this statement never returns (or has an unsound type.) + val g : unit -> int = Exception: Not_found. Raised at f in file "//toplevel//", line 2, characters 11-26 diff --git a/testsuite/tests/tool-toplevel/pr7060.compilers.reference b/testsuite/tests/tool-toplevel/pr7060.compilers.reference index 9f661b83f8..d5b58ce8a5 100644 --- a/testsuite/tests/tool-toplevel/pr7060.compilers.reference +++ b/testsuite/tests/tool-toplevel/pr7060.compilers.reference @@ -6,6 +6,7 @@ Line 1, characters 18-54: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: B + val print_t : Format.formatter -> t -> unit = - : t = diff --git a/testsuite/tests/typing-deprecated/alerts.ml b/testsuite/tests/typing-deprecated/alerts.ml index e909858edc..ea71e5eb12 100644 --- a/testsuite/tests/typing-deprecated/alerts.ml +++ b/testsuite/tests/typing-deprecated/alerts.ml @@ -49,6 +49,7 @@ Line 1, characters 8-11: ^^^ Error (alert baz): X.t BAZ + Line 1, characters 8-11: 1 | let _ = X.t;; ^^^ @@ -87,6 +88,7 @@ Line 2, characters 2-12: 2 | val x: int ^^^^^^^^^^ Expected signature + Line 6, characters 6-7: 6 | end = X;; ^ @@ -100,6 +102,7 @@ Line 4, characters 2-12: 4 | val z: int ^^^^^^^^^^ Expected signature + Line 6, characters 6-7: 6 | end = X;; ^ @@ -113,6 +116,7 @@ Line 5, characters 2-12: 5 | val t: int ^^^^^^^^^^ Expected signature + Line 6, characters 6-7: 6 | end = X;; ^ @@ -151,6 +155,7 @@ Line 4, characters 2-12: 4 | val x: int ^^^^^^^^^^ Expected signature + Line 8, characters 6-7: 8 | end = X;; ^ @@ -164,6 +169,7 @@ Line 6, characters 2-12: 6 | val z: int ^^^^^^^^^^ Expected signature + Line 8, characters 6-7: 8 | end = X;; ^ @@ -177,6 +183,7 @@ Line 7, characters 2-12: 7 | val t: int ^^^^^^^^^^ Expected signature + Line 8, characters 6-7: 8 | end = X;; ^ @@ -259,11 +266,13 @@ Line 2, characters 13-25: ^^^^^^^^^^^^ Warning 47 [attribute-payload]: illegal payload for attribute 'alert'. Invalid payload + Line 3, characters 13-29: 3 | val y: int [@@alert bla 42] ^^^^^^^^^^^^^^^^ Warning 47 [attribute-payload]: illegal payload for attribute 'alert'. Invalid payload + Line 4, characters 13-28: 4 | val z: int [@@alert "bla"] ^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/typing-deprecated/deprecated.ml b/testsuite/tests/typing-deprecated/deprecated.ml index 56ac05d53f..74bad9ce2d 100644 --- a/testsuite/tests/typing-deprecated/deprecated.ml +++ b/testsuite/tests/typing-deprecated/deprecated.ml @@ -99,6 +99,7 @@ Line 1, characters 9-12: 1 | type t = X.t * X.s ^^^ Alert deprecated: X.t + Line 1, characters 15-18: 1 | type t = X.t * X.s ^^^ @@ -218,6 +219,7 @@ Line 1, characters 26-29: 1 | module rec M : sig val x: X.t end = struct let x = X.x end ^^^ Alert deprecated: X.t + Line 1, characters 51-54: 1 | module rec M : sig val x: X.t end = struct let x = X.x end ^^^ @@ -542,6 +544,7 @@ Line 2, characters 24-39: 2 | [@@ocaml.ppwarning "Pp warning 2!"] ^^^^^^^^^^^^^^^ Warning 22 [preprocessor]: Pp warning 2! + Line 1, characters 29-44: 1 | let x = () [@ocaml.ppwarning "Pp warning 1!"] ^^^^^^^^^^^^^^^ @@ -600,6 +603,7 @@ Line 4, characters 21-36: 4 | [@@ocaml.ppwarning "Pp warning 3!"] ^^^^^^^^^^^^^^^ Warning 22 [preprocessor]: Pp warning 3! + Line 3, characters 21-36: 3 | [@ocaml.ppwarning "Pp warning 2!"] ^^^^^^^^^^^^^^^ @@ -614,6 +618,7 @@ Line 1, characters 25-29: 1 | let ([][@ocaml.ppwarning "XX"]) = [] ^^^^ Warning 22 [preprocessor]: XX + Line 1, characters 4-31: 1 | let ([][@ocaml.ppwarning "XX"]) = [] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/typing-gadts/pr5785.ml b/testsuite/tests/typing-gadts/pr5785.ml index aebad418d0..7817cb0422 100644 --- a/testsuite/tests/typing-gadts/pr5785.ml +++ b/testsuite/tests/typing-gadts/pr5785.ml @@ -20,6 +20,7 @@ Lines 7-9, characters 43-24: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (One, Two) + module Add : functor (T : sig type two end) -> sig diff --git a/testsuite/tests/typing-gadts/pr5906.ml b/testsuite/tests/typing-gadts/pr5906.ml index 048c6ef4bf..86ebfd0e36 100644 --- a/testsuite/tests/typing-gadts/pr5906.ml +++ b/testsuite/tests/typing-gadts/pr5906.ml @@ -36,6 +36,7 @@ Lines 12-16, characters 2-36: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (Eq, Int _, _) + val eval : ('a, 'b, 'c) binop -> 'a constant -> 'b constant -> 'c constant = Exception: Match_failure ("", 12, 2). diff --git a/testsuite/tests/typing-gadts/pr6241.ml b/testsuite/tests/typing-gadts/pr6241.ml index bd9e295c1a..bf1108aeac 100644 --- a/testsuite/tests/typing-gadts/pr6241.ml +++ b/testsuite/tests/typing-gadts/pr6241.ml @@ -27,6 +27,7 @@ Lines 8-9, characters 52-13: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: A + module M : functor (A : sig module type T end) (B : sig module type T end) -> sig val f : ((module A.T), (module B.T)) t -> string end diff --git a/testsuite/tests/typing-gadts/pr6993_bad.ml b/testsuite/tests/typing-gadts/pr6993_bad.ml index 7f71417e1f..d3a74ce497 100644 --- a/testsuite/tests/typing-gadts/pr6993_bad.ml +++ b/testsuite/tests/typing-gadts/pr6993_bad.ml @@ -23,6 +23,7 @@ Line 2, characters 36-66: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: Y + val f : ('a list, 'a) eqp -> unit = module rec A : sig type t = B.t list end and B : sig type t val eq : (B.t list, t) eqp end diff --git a/testsuite/tests/typing-gadts/pr7390.ml b/testsuite/tests/typing-gadts/pr7390.ml index 4c7b65b328..7522209a38 100644 --- a/testsuite/tests/typing-gadts/pr7390.ml +++ b/testsuite/tests/typing-gadts/pr7390.ml @@ -27,5 +27,6 @@ Line 2, characters 2-28: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: Either (N, Y _) + val f : filled either -> string = |}] diff --git a/testsuite/tests/typing-gadts/pr7432.ml b/testsuite/tests/typing-gadts/pr7432.ml index f7efea65fe..abb2167be1 100644 --- a/testsuite/tests/typing-gadts/pr7432.ml +++ b/testsuite/tests/typing-gadts/pr7432.ml @@ -27,6 +27,7 @@ Line 2, characters 2-30: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: `L Refl + val f : [ `L of (s, t) eql | `R of silly ] -> 'a = |}] diff --git a/testsuite/tests/typing-gadts/pr9759.ml b/testsuite/tests/typing-gadts/pr9759.ml index 165eccdd8b..cf68cebbc5 100644 --- a/testsuite/tests/typing-gadts/pr9759.ml +++ b/testsuite/tests/typing-gadts/pr9759.ml @@ -27,5 +27,6 @@ Line 9, characters 4-9: 9 | | indir -> ^^^^^ Warning 11 [redundant-case]: this match case is unused. + val foo : 'k general -> 'k general = |}] diff --git a/testsuite/tests/typing-gadts/principality-and-gadts.ml b/testsuite/tests/typing-gadts/principality-and-gadts.ml index e4236f32e5..96ab406e52 100644 --- a/testsuite/tests/typing-gadts/principality-and-gadts.ml +++ b/testsuite/tests/typing-gadts/principality-and-gadts.ml @@ -48,6 +48,7 @@ Line 4, characters 4-10: ^^^^^^ Warning 18 [not-principal]: typing this pattern requires considering int and a as equal. But the knowledge of these types is not principal. + Line 5, characters 4-11: 5 | | BoolLit, b -> 1 ^^^^^^^ @@ -154,6 +155,7 @@ Line 4, characters 4-6: ^^ Warning 18 [not-principal]: typing this pattern requires considering unit ab and x as equal. But the knowledge of these types is not principal. + Line 5, characters 4-7: 5 | | MAB -> false;; ^^^ @@ -385,6 +387,7 @@ Line 3, characters 26-31: ^^^^^ Warning 18 [not-principal]: typing this pattern requires considering M.t and N.t as equal. But the knowledge of these types is not principal. + Line 3, characters 4-33: 3 | | { x = (x : N.t); eq = Refl3 } -> x ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/typing-gadts/test.ml b/testsuite/tests/typing-gadts/test.ml index c54c4e27bd..57ec2efb39 100644 --- a/testsuite/tests/typing-gadts/test.ml +++ b/testsuite/tests/typing-gadts/test.ml @@ -109,6 +109,7 @@ Lines 11-12, characters 6-19: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: C1 _ + Lines 24-26, characters 6-30: 24 | ......function 25 | | Foo _ , Foo _ -> true @@ -163,6 +164,7 @@ Line 2, characters 10-18: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: None + Line 4, characters 10-18: 4 | class d (Just x) = object method x : int = x end ^^^^^^^^ diff --git a/testsuite/tests/typing-misc/disambiguate_principality.ml b/testsuite/tests/typing-misc/disambiguate_principality.ml index 8fb2154557..3aa062eee1 100644 --- a/testsuite/tests/typing-misc/disambiguate_principality.ml +++ b/testsuite/tests/typing-misc/disambiguate_principality.ml @@ -117,6 +117,7 @@ Line 4, characters 4-15: 4 | | { lbl = _ } -> () ^^^^^^^^^^^ Warning 18 [not-principal]: this type-based record disambiguation is not principal. + Line 4, characters 4-15: 4 | | { lbl = _ } -> () ^^^^^^^^^^^ @@ -152,6 +153,7 @@ Line 4, characters 4-15: 4 | | { lbl = _ } -> () ^^^^^^^^^^^ Warning 18 [not-principal]: this type-based record disambiguation is not principal. + Line 4, characters 4-15: 4 | | { lbl = _ } -> () ^^^^^^^^^^^ @@ -206,6 +208,7 @@ Line 4, characters 17-28: 4 | | { contents = { lbl = _ } } -> () ^^^^^^^^^^^ Warning 18 [not-principal]: this type-based record disambiguation is not principal. + Line 4, characters 4-30: 4 | | { contents = { lbl = _ } } -> () ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -241,6 +244,7 @@ Line 4, characters 17-28: 4 | | { contents = { lbl = _ } } -> () ^^^^^^^^^^^ Warning 18 [not-principal]: this type-based record disambiguation is not principal. + Line 4, characters 4-30: 4 | | { contents = { lbl = _ } } -> () ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -466,6 +470,7 @@ Line 4, characters 17-18: 4 | | { contents = A } -> () ^ Warning 18 [not-principal]: this type-based constructor disambiguation is not principal. + Line 4, characters 4-20: 4 | | { contents = A } -> () ^^^^^^^^^^^^^^^^ @@ -501,6 +506,7 @@ Line 4, characters 17-18: 4 | | { contents = A } -> () ^ Warning 18 [not-principal]: this type-based constructor disambiguation is not principal. + Line 4, characters 4-20: 4 | | { contents = A } -> () ^^^^^^^^^^^^^^^^ @@ -553,6 +559,7 @@ Line 3, characters 9-10: 3 | x := B ^ Warning 18 [not-principal]: this type-based constructor disambiguation is not principal. + Lines 1-3, characters 8-10: 1 | ........function 2 | | ({ contents = M.A } : M.t ref) as x -> diff --git a/testsuite/tests/typing-misc/polyvars.ml b/testsuite/tests/typing-misc/polyvars.ml index ae3a44d4ab..0b4eb06f90 100644 --- a/testsuite/tests/typing-misc/polyvars.ml +++ b/testsuite/tests/typing-misc/polyvars.ml @@ -83,6 +83,7 @@ Line 10, characters 0-29: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (_, 0) + Line 10, characters 21-24: 10 | function `B,1 -> 1 | _,1 -> 2;; ^^^ @@ -94,6 +95,7 @@ Line 11, characters 0-29: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: (0, _) + Line 11, characters 21-24: 11 | function 1,`B -> 1 | 1,_ -> 2;; ^^^ diff --git a/testsuite/tests/typing-misc/pr6939-flat-float-array.ml b/testsuite/tests/typing-misc/pr6939-flat-float-array.ml index d869300c3a..6c25346006 100644 --- a/testsuite/tests/typing-misc/pr6939-flat-float-array.ml +++ b/testsuite/tests/typing-misc/pr6939-flat-float-array.ml @@ -9,6 +9,7 @@ Line 1, characters 12-19: 1 | let rec x = [| x |]; 1.;; ^^^^^^^ Warning 10 [non-unit-statement]: this expression should have type unit. + Line 1, characters 12-23: 1 | let rec x = [| x |]; 1.;; ^^^^^^^^^^^ diff --git a/testsuite/tests/typing-objects/Tests.ml b/testsuite/tests/typing-objects/Tests.ml index 7ef0f0fcf4..9ea371aa93 100644 --- a/testsuite/tests/typing-objects/Tests.ml +++ b/testsuite/tests/typing-objects/Tests.ml @@ -484,15 +484,18 @@ Line 3, characters 2-13: ^^^^^^^^^^^ Warning 13 [instance-variable-override]: the following instance variables are overridden by the class c : x + Line 4, characters 6-7: 4 | val y = 3 ^ Warning 13 [instance-variable-override]: the instance variable y is overridden. + Line 6, characters 2-13: 6 | inherit d 7 ^^^^^^^^^^^ Warning 13 [instance-variable-override]: the following instance variables are overridden by the class d : t z + Line 7, characters 6-7: 7 | val u = 3 ^ diff --git a/testsuite/tests/typing-polyvariants-bugs/pr7824.ml b/testsuite/tests/typing-polyvariants-bugs/pr7824.ml index 0af60a0cb3..a58c9ddc98 100644 --- a/testsuite/tests/typing-polyvariants-bugs/pr7824.ml +++ b/testsuite/tests/typing-polyvariants-bugs/pr7824.ml @@ -43,6 +43,7 @@ Lines 4-5, characters 2-38: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: [] + val f : [ `A ] Element.t -> [ `A | `C ] Element.t = |}];; diff --git a/testsuite/tests/typing-private/private.compilers.principal.reference b/testsuite/tests/typing-private/private.compilers.principal.reference index 43f72b285d..d2c398a2fd 100644 --- a/testsuite/tests/typing-private/private.compilers.principal.reference +++ b/testsuite/tests/typing-private/private.compilers.principal.reference @@ -112,6 +112,7 @@ Line 3, characters 40-63: 3 | module Test2 : module type of Test with type t = private Test.t = Test;; ^^^^^^^^^^^^^^^^^^^^^^^ Alert deprecated: spurious use of private + module Test2 : sig type t = Test.t = private A end type t = private < x : int; .. > type t = private < x : int; .. > diff --git a/testsuite/tests/typing-private/private.compilers.reference b/testsuite/tests/typing-private/private.compilers.reference index b282f9d1c8..0ceefce6ed 100644 --- a/testsuite/tests/typing-private/private.compilers.reference +++ b/testsuite/tests/typing-private/private.compilers.reference @@ -112,6 +112,7 @@ Line 3, characters 40-63: 3 | module Test2 : module type of Test with type t = private Test.t = Test;; ^^^^^^^^^^^^^^^^^^^^^^^ Alert deprecated: spurious use of private + module Test2 : sig type t = Test.t = private A end type t = private < x : int; .. > type t = private < x : int; .. > diff --git a/testsuite/tests/typing-safe-linking/b_bad.compilers.reference b/testsuite/tests/typing-safe-linking/b_bad.compilers.reference index 8911d38448..fa4ce06f38 100644 --- a/testsuite/tests/typing-safe-linking/b_bad.compilers.reference +++ b/testsuite/tests/typing-safe-linking/b_bad.compilers.reference @@ -4,6 +4,7 @@ File "b_bad.ml", lines 13-14, characters 29-28: Error (warning 8 [partial-match]): this pattern-matching is not exhaustive. Here is an example of a case that is not matched: Y + File "b_bad.ml", line 18, characters 11-14: 18 | let () = f A.y ^^^ diff --git a/testsuite/tests/typing-unboxed/test.ml b/testsuite/tests/typing-unboxed/test.ml index 850713cf6a..4f391061dc 100644 --- a/testsuite/tests/typing-unboxed/test.ml +++ b/testsuite/tests/typing-unboxed/test.ml @@ -74,15 +74,18 @@ Line 3, characters 2-61: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Alert deprecated: [@@unboxed] + [@@noalloc] should be used instead of "float" + Line 4, characters 2-53: 4 | external b : float -> float = "b" "noalloc" "b_nat" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Alert deprecated: [@@noalloc] should be used instead of "noalloc" + Line 5, characters 2-51: 5 | external c : float -> float = "c" "c_nat" "float" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Alert deprecated: [@@unboxed] + [@@noalloc] should be used instead of "float" + Line 6, characters 2-45: 6 | external d : float -> float = "d" "noalloc" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -784,6 +787,7 @@ versions of the compiler, breaking the primitive implementation. You should explicitly annotate the declaration of i with [@@boxed] or [@@unboxed], so that its external interface remains stable in the future. + Line 3, characters 0-34: 3 | external id : i -> j = "%identity";; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml b/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml index 215d412694..5636826592 100644 --- a/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml +++ b/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml @@ -387,12 +387,14 @@ Line 2, characters 4-5: ^ Warning 41 [ambiguous-name]: A belongs to several types: t2 t The first one was selected. Please disambiguate if this is wrong. + Lines 1-3, characters 41-10: 1 | .........................................function 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 [fragile-match]: this pattern-matching is fragile. It will remain exhaustive when constructors are added to type t2. + Line 2, characters 4-56: 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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -408,22 +410,26 @@ Line 2, characters 4-5: ^ Warning 41 [ambiguous-name]: A belongs to several types: t2 t The first one was selected. Please disambiguate if this is wrong. + Line 2, characters 24-25: 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 ^ Warning 41 [ambiguous-name]: A belongs to several types: t2 t The first one was selected. Please disambiguate if this is wrong. + Line 2, characters 42-43: 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 ^ Warning 41 [ambiguous-name]: B belongs to several types: t2 t The first one was selected. Please disambiguate if this is wrong. + Lines 1-3, characters 41-10: 1 | .........................................function 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 [fragile-match]: this pattern-matching is fragile. It will remain exhaustive when constructors are added to type t2. + Line 2, characters 4-56: 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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/typing-warnings/exhaustiveness.ml b/testsuite/tests/typing-warnings/exhaustiveness.ml index db48bf9f74..bd40fb4375 100644 --- a/testsuite/tests/typing-warnings/exhaustiveness.ml +++ b/testsuite/tests/typing-warnings/exhaustiveness.ml @@ -36,6 +36,7 @@ Line 1, characters 20-48: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 4 [fragile-match]: this pattern-matching is fragile. It will remain exhaustive when constructors are added to type t. + Line 1, characters 42-43: 1 | let f (x : int t) = match x with A -> 1 | _ -> 2;; (* warn *) ^ diff --git a/testsuite/tests/typing-warnings/open_warnings.ml b/testsuite/tests/typing-warnings/open_warnings.ml index 04cf213fa3..651ee39b9f 100644 --- a/testsuite/tests/typing-warnings/open_warnings.ml +++ b/testsuite/tests/typing-warnings/open_warnings.ml @@ -11,6 +11,7 @@ Line 2, characters 20-26: 2 | module M = struct type t end (* unused type t *) ^^^^^^ Warning 34 [unused-type-declaration]: unused type t. + Line 3, characters 2-8: 3 | open M (* unused open *) ^^^^^^ @@ -39,10 +40,12 @@ Line 4, characters 2-8: 4 | open M (* used by line below; shadow constructor A *) ^^^^^^ Warning 45 [open-shadow-label-constructor]: this open statement shadows the constructor A (which is later used) + Line 2, characters 2-13: 2 | type t0 = A (* unused type and constructor *) ^^^^^^^^^^^ Warning 34 [unused-type-declaration]: unused type t0. + Line 2, characters 12-13: 2 | type t0 = A (* unused type and constructor *) ^ @@ -61,10 +64,12 @@ Line 3, characters 20-30: 3 | module M = struct type t = A end (* unused type and constructor *) ^^^^^^^^^^ Warning 34 [unused-type-declaration]: unused type t. + Line 3, characters 29-30: 3 | module M = struct type t = A end (* unused type and constructor *) ^ Warning 37 [unused-constructor]: unused constructor A. + Line 4, characters 2-8: 4 | open M (* unused open; no shadowing (A below refers to the one in t0) *) ^^^^^^ @@ -83,10 +88,12 @@ Line 4, characters 2-8: 4 | open M (* shadow constructor A *) ^^^^^^ Warning 45 [open-shadow-label-constructor]: this open statement shadows the constructor A (which is later used) + Line 2, characters 2-13: 2 | type t0 = A (* unused type and constructor *) ^^^^^^^^^^^ Warning 34 [unused-type-declaration]: unused type t0. + Line 2, characters 12-13: 2 | type t0 = A (* unused type and constructor *) ^ @@ -104,6 +111,7 @@ Line 2, characters 20-26: 2 | module M = struct type t end (* unused type t *) ^^^^^^ Warning 34 [unused-type-declaration]: unused type t. + Line 3, characters 2-9: 3 | open! M (* unused open *) ^^^^^^^ @@ -131,6 +139,7 @@ Line 2, characters 2-13: 2 | type t0 = A (* unused type and constructor *) ^^^^^^^^^^^ Warning 34 [unused-type-declaration]: unused type t0. + Line 2, characters 12-13: 2 | type t0 = A (* unused type and constructor *) ^ @@ -149,10 +158,12 @@ Line 3, characters 20-30: 3 | module M = struct type t = A end (* unused type and constructor *) ^^^^^^^^^^ Warning 34 [unused-type-declaration]: unused type t. + Line 3, characters 29-30: 3 | module M = struct type t = A end (* unused type and constructor *) ^ Warning 37 [unused-constructor]: unused constructor A. + Line 4, characters 2-9: 4 | open! M (* unused open; no shadowing (A below refers to the one in t0) *) ^^^^^^^ @@ -171,6 +182,7 @@ Line 2, characters 2-13: 2 | type t0 = A (* unused type and constructor *) ^^^^^^^^^^^ Warning 34 [unused-type-declaration]: unused type t0. + Line 2, characters 12-13: 2 | type t0 = A (* unused type and constructor *) ^ diff --git a/testsuite/tests/typing-warnings/pr5892.ml b/testsuite/tests/typing-warnings/pr5892.ml index e20e1aeb04..08939c033f 100644 --- a/testsuite/tests/typing-warnings/pr5892.ml +++ b/testsuite/tests/typing-warnings/pr5892.ml @@ -20,5 +20,6 @@ Line 1, characters 31-52: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: Right + val f : CamlinternalOO.label choice -> bool = |}] diff --git a/testsuite/tests/typing-warnings/pr6872.ml b/testsuite/tests/typing-warnings/pr6872.ml index 6d17966c2a..b5ec32bedd 100644 --- a/testsuite/tests/typing-warnings/pr6872.ml +++ b/testsuite/tests/typing-warnings/pr6872.ml @@ -63,6 +63,7 @@ Line 1, characters 26-27: 1 | function Not_found -> 1 | A -> 2 | _ -> 3 ^ Warning 18 [not-principal]: this type-based constructor disambiguation is not principal. + Line 1, characters 26-27: 1 | function Not_found -> 1 | A -> 2 | _ -> 3 ^ @@ -79,6 +80,7 @@ Line 1, characters 10-11: ^ Warning 42 [disambiguated-name]: this use of A relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 1, characters 17-18: 1 | try raise A with A -> 2 ^ diff --git a/testsuite/tests/typing-warnings/pr7115.ml b/testsuite/tests/typing-warnings/pr7115.ml index 139e9f362c..823f7fb0e3 100644 --- a/testsuite/tests/typing-warnings/pr7115.ml +++ b/testsuite/tests/typing-warnings/pr7115.ml @@ -45,6 +45,7 @@ Line 2, characters 24-25: 2 | module O = struct let x = 42 (* unused *) end ^ Warning 32 [unused-value-declaration]: unused value x. + Line 3, characters 2-8: 3 | open O (* unused open *) ^^^^^^ diff --git a/testsuite/tests/typing-warnings/pr7261.compilers.reference b/testsuite/tests/typing-warnings/pr7261.compilers.reference index 57b4173004..03127652cf 100644 --- a/testsuite/tests/typing-warnings/pr7261.compilers.reference +++ b/testsuite/tests/typing-warnings/pr7261.compilers.reference @@ -6,5 +6,6 @@ Line 2, characters 35-49: 2 | Foo: 'b * 'b -> foo constraint 'b = [> `Bla ];; ^^^^^^^^^^^^^^ Warning 62 [constraint-on-gadt]: Type constraints do not apply to GADT cases of variant types. + type foo = Foo : 'b * 'b -> foo diff --git a/testsuite/tests/typing-warnings/pr7297.ml b/testsuite/tests/typing-warnings/pr7297.ml index fba56c934c..572bdb2c95 100644 --- a/testsuite/tests/typing-warnings/pr7297.ml +++ b/testsuite/tests/typing-warnings/pr7297.ml @@ -15,5 +15,6 @@ Line 1, characters 9-19: 1 | let () = raise Exit; () ;; (* warn *) ^^^^^^^^^^ Warning 21 [nonreturning-statement]: this statement never returns (or has an unsound type.) + Exception: Stdlib.Exit. |}] diff --git a/testsuite/tests/typing-warnings/pr7553.ml b/testsuite/tests/typing-warnings/pr7553.ml index 24faa0e8cf..3079e979a2 100644 --- a/testsuite/tests/typing-warnings/pr7553.ml +++ b/testsuite/tests/typing-warnings/pr7553.ml @@ -42,6 +42,7 @@ Line 5, characters 10-14: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: Some _ + Line 4, characters 6-12: 4 | open A ^^^^^^ diff --git a/testsuite/tests/typing-warnings/records.ml b/testsuite/tests/typing-warnings/records.ml index 74b3de8489..a7b66dcf4f 100644 --- a/testsuite/tests/typing-warnings/records.ml +++ b/testsuite/tests/typing-warnings/records.ml @@ -27,21 +27,25 @@ Line 3, characters 19-20: ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 4, characters 29-30: 4 | let f2 r = ignore (r:t); r.x (* non principal *) ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 7, characters 18-19: 7 | match r with {x; y} -> y + y (* ok *) ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 7, characters 21-22: 7 | match r with {x; y} -> y + y (* ok *) ^ Warning 42 [disambiguated-name]: this use of y relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 7, characters 18-19: 7 | match r with {x; y} -> y + y (* ok *) ^ @@ -54,25 +58,30 @@ Line 3, characters 19-20: ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 4, characters 29-30: 4 | let f2 r = ignore (r:t); r.x (* non principal *) ^ Warning 18 [not-principal]: this type-based field disambiguation is not principal. + Line 4, characters 29-30: 4 | let f2 r = ignore (r:t); r.x (* non principal *) ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 7, characters 18-19: 7 | match r with {x; y} -> y + y (* ok *) ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 7, characters 21-22: 7 | match r with {x; y} -> y + y (* ok *) ^ Warning 42 [disambiguated-name]: this use of y relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 7, characters 18-19: 7 | match r with {x; y} -> y + y (* ok *) ^ @@ -91,6 +100,7 @@ Line 3, characters 25-31: ^^^^^^ Warning 41 [ambiguous-name]: these field labels belong to several types: M1.u M1.t The first one was selected. Please disambiguate if this is wrong. + Line 3, characters 35-36: 3 | let f r = match r with {x; y} -> y + y ^ @@ -111,11 +121,13 @@ Line 6, characters 8-9: ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 6, characters 11-12: 6 | {x; y} -> y + y ^ Warning 42 [disambiguated-name]: this use of y relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 6, characters 8-9: 6 | {x; y} -> y + y ^ @@ -127,15 +139,18 @@ Line 6, characters 8-9: ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 6, characters 11-12: 6 | {x; y} -> y + y ^ Warning 42 [disambiguated-name]: this use of y relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 6, characters 7-13: 6 | {x; y} -> y + y ^^^^^^ Warning 18 [not-principal]: this type-based record disambiguation is not principal. + Line 6, characters 8-9: 6 | {x; y} -> y + y ^ @@ -168,6 +183,7 @@ Line 1, characters 18-19: Warning 40 [name-out-of-scope]: x was selected from type M.t. It is not visible in the current scope, and will not be selected if the type becomes unknown. + Line 1, characters 18-19: 1 | let f (r:M.t) = r.x;; (* warning *) ^ @@ -182,6 +198,7 @@ Line 1, characters 8-9: ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 1, characters 7-10: 1 | let f ({x}:M.t) = x;; (* warning *) ^^^ @@ -214,6 +231,7 @@ Line 4, characters 20-21: ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 3, characters 2-8: 3 | open N ^^^^^^ @@ -264,6 +282,7 @@ Line 3, characters 9-10: ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 3, characters 8-13: 3 | let f {x;z} = x,z ^^^^^ @@ -282,6 +301,7 @@ Line 3, characters 11-12: ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 3, characters 10-24: 3 | let r = {x=true;z='z'} ^^^^^^^^^^^^^^ @@ -299,6 +319,7 @@ Line 4, characters 11-12: ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 4, characters 16-17: 4 | let r = {x=3; y=true} ^ @@ -365,11 +386,13 @@ Line 1, characters 8-28: ^^^^^^^^^^^^^^^^^^^^ Warning 41 [ambiguous-name]: x belongs to several types: MN.bar MN.foo The first one was selected. Please disambiguate if this is wrong. + Line 1, characters 8-28: 1 | let r = {MN.x = 3; NM.y = 4};; (* error: type would change with order *) ^^^^^^^^^^^^^^^^^^^^ Warning 41 [ambiguous-name]: y belongs to several types: NM.foo NM.bar The first one was selected. Please disambiguate if this is wrong. + Line 1, characters 19-23: 1 | let r = {MN.x = 3; NM.y = 4};; (* error: type would change with order *) ^^^^ @@ -400,6 +423,7 @@ Line 3, characters 37-38: ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 3, characters 44-45: 3 | let f r = ignore (r: foo); {r with x = 2; z = 3} ^ @@ -428,6 +452,7 @@ Line 3, characters 38-39: ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 3, characters 45-46: 3 | let f r = ignore (r: foo); { r with x = 3; a = 4 } ^ @@ -445,11 +470,13 @@ Line 3, characters 11-12: ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 3, characters 16-17: 3 | let r = {x=1; y=2} ^ Warning 42 [disambiguated-name]: this use of y relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 4, characters 18-19: 4 | let r: other = {x=1; y=2} ^ @@ -517,6 +544,7 @@ Line 1, characters 13-14: ^ Warning 42 [disambiguated-name]: this use of A relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 1, characters 20-21: 1 | class g = f (A : t) A;; (* warn with -principal *) ^ @@ -529,10 +557,12 @@ Line 1, characters 13-14: ^ Warning 42 [disambiguated-name]: this use of A relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 1, characters 20-21: 1 | class g = f (A : t) A;; (* warn with -principal *) ^ Warning 18 [not-principal]: this type-based constructor disambiguation is not principal. + Line 1, characters 20-21: 1 | class g = f (A : t) A;; (* warn with -principal *) ^ @@ -558,6 +588,7 @@ Line 7, characters 15-16: ^ Warning 42 [disambiguated-name]: this use of x relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 6, characters 2-8: 6 | open M (* this open is unused, it isn't reported as shadowing 'x' *) ^^^^^^ @@ -582,6 +613,7 @@ Line 6, characters 2-8: 6 | open M (* this open shadows label 'x' *) ^^^^^^ Warning 45 [open-shadow-label-constructor]: this open statement shadows the label x (which is later used) + Line 7, characters 10-18: 7 | let y = {x = ""} ^^^^^^^^ @@ -647,6 +679,7 @@ Line 7, characters 11-14: ^^^ Warning 42 [disambiguated-name]: this use of loc relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 7, characters 10-15: 7 | |`Key {loc} -> loc ^^^^^ @@ -691,6 +724,7 @@ Line 2, characters 27-28: ^ Warning 42 [disambiguated-name]: this use of y relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 2, characters 18-36: 2 | let f (x : M.t) = { x with y = 'a' } ^^^^^^^^^^^^^^^^^^ @@ -703,6 +737,7 @@ Line 3, characters 27-28: ^ Warning 42 [disambiguated-name]: this use of y relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 3, characters 18-36: 3 | let g (x : M.t) = { x with y = 'a' } :: [] ^^^^^^^^^^^^^^^^^^ @@ -715,17 +750,20 @@ Line 4, characters 27-28: ^ Warning 42 [disambiguated-name]: this use of y relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 4, characters 18-36: 4 | let h (x : M.t) = { x with y = 'a' } :: { x with y = 'b' } :: [];; ^^^^^^^^^^^^^^^^^^ Warning 40 [name-out-of-scope]: this record of type M.t contains fields that are not visible in the current scope: y. They will not be selected if the type becomes unknown. + Line 4, characters 49-50: 4 | let h (x : M.t) = { x with y = 'a' } :: { x with y = 'b' } :: [];; ^ Warning 42 [disambiguated-name]: this use of y relies on type-directed disambiguation, it will not compile with OCaml 4.00 or earlier. + Line 4, characters 40-58: 4 | let h (x : M.t) = { x with y = 'a' } :: { x with y = 'b' } :: [];; ^^^^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/typing-warnings/unused_recmodule.ml b/testsuite/tests/typing-warnings/unused_recmodule.ml index 223de358c4..46c68e8a21 100644 --- a/testsuite/tests/typing-warnings/unused_recmodule.ml +++ b/testsuite/tests/typing-warnings/unused_recmodule.ml @@ -27,5 +27,6 @@ Line 14, characters 4-10: 14 | type t ^^^^^^ Warning 34 [unused-type-declaration]: unused type t. + module M : sig end |}];; diff --git a/testsuite/tests/typing-warnings/unused_types.ml b/testsuite/tests/typing-warnings/unused_types.ml index 318103e557..2dbf38442e 100644 --- a/testsuite/tests/typing-warnings/unused_types.ml +++ b/testsuite/tests/typing-warnings/unused_types.ml @@ -40,6 +40,7 @@ Line 3, characters 2-27: 3 | type unused = A of unused ^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 34 [unused-type-declaration]: unused type unused. + Line 3, characters 16-27: 3 | type unused = A of unused ^^^^^^^^^^^ @@ -370,6 +371,7 @@ Line 3, characters 2-33: 3 | type t = A [@warning "-37"] | B ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 34 [unused-type-declaration]: unused type t. + Line 3, characters 30-33: 3 | type t = A [@warning "-37"] | B ^^^ @@ -387,6 +389,7 @@ Line 2, characters 13-21: 2 | type t = { a : int; b : int } ^^^^^^^^ Warning 69 [unused-field]: unused record field a. + Line 2, characters 22-29: 2 | type t = { a : int; b : int } ^^^^^^^ @@ -495,6 +498,7 @@ Line 3, characters 2-55: 3 | type t = { a: int [@warning "-unused-field"]; b:int } ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 34 [unused-type-declaration]: unused type t. + Line 3, characters 48-53: 3 | type t = { a: int [@warning "-unused-field"]; b:int } ^^^^^ diff --git a/testsuite/tests/warnings/deprecated_module.compilers.reference b/testsuite/tests/warnings/deprecated_module.compilers.reference index c733b9170a..4546d3112d 100644 --- a/testsuite/tests/warnings/deprecated_module.compilers.reference +++ b/testsuite/tests/warnings/deprecated_module.compilers.reference @@ -2,6 +2,7 @@ File "deprecated_module.ml", line 16, characters 8-11: 16 | let _ = M.x ^^^ Alert deprecated: module M + File "deprecated_module.ml", line 17, characters 8-9: 17 | include M ^ diff --git a/testsuite/tests/warnings/deprecated_module_assigment.compilers.reference b/testsuite/tests/warnings/deprecated_module_assigment.compilers.reference index e918a19da6..81cd76aaf3 100644 --- a/testsuite/tests/warnings/deprecated_module_assigment.compilers.reference +++ b/testsuite/tests/warnings/deprecated_module_assigment.compilers.reference @@ -11,6 +11,7 @@ File "deprecated_module_assigment.ml", line 17, characters 15-26: 17 | module Y : sig val x : int end = X ^^^^^^^^^^^ Expected signature + File "deprecated_module_assigment.ml", line 23, characters 13-14: 23 | module B = F(X) ^ @@ -24,6 +25,7 @@ File "deprecated_module_assigment.ml", line 21, characters 17-28: 21 | module F(A : sig val x : int end) = struct let _ = A.x end ^^^^^^^^^^^ Expected signature + File "deprecated_module_assigment.ml", line 33, characters 39-78: 33 | module CSTR : sig type t = A | B end = struct type t = A [@deprecated] | B end ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -36,6 +38,7 @@ File "deprecated_module_assigment.ml", line 33, characters 27-28: 33 | module CSTR : sig type t = A | B end = struct type t = A [@deprecated] | B end ^ Expected signature + File "deprecated_module_assigment.ml", line 37, characters 2-20: 37 | type s = t = A | B ^^^^^^^^^^^^^^^^^^ @@ -48,6 +51,7 @@ File "deprecated_module_assigment.ml", line 37, characters 15-16: 37 | type s = t = A | B ^ Expected signature + File "deprecated_module_assigment.ml", line 45, characters 0-58: 45 | struct type t = {mutable x: int [@deprecated_mutable]} end ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -60,6 +64,7 @@ File "deprecated_module_assigment.ml", line 44, characters 14-28: 44 | sig type t = {mutable x: int} end = ^^^^^^^^^^^^^^ Expected signature + File "deprecated_module_assigment.ml", line 49, characters 2-31: 49 | type s = t = {mutable x: int} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -72,6 +77,7 @@ File "deprecated_module_assigment.ml", line 49, characters 16-30: 49 | type s = t = {mutable x: int} ^^^^^^^^^^^^^^ Expected signature + File "deprecated_module_assigment.ml", line 54, characters 37-75: 54 | module TYPE : sig type t = int end = struct type t = int [@@deprecated] end ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -84,6 +90,7 @@ File "deprecated_module_assigment.ml", line 54, characters 18-30: 54 | module TYPE : sig type t = int end = struct type t = int [@@deprecated] end ^^^^^^^^^^^^ Expected signature + File "deprecated_module_assigment.ml", line 60, characters 0-52: 60 | struct class c = object end [@@deprecated "FOO"] end ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -97,6 +104,7 @@ File "deprecated_module_assigment.ml", line 59, characters 4-24: 59 | sig class c : object end end = ^^^^^^^^^^^^^^^^^^^^ Expected signature + File "deprecated_module_assigment.ml", line 64, characters 0-57: 64 | struct class type c = object end [@@deprecated "FOO"] end ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -110,6 +118,7 @@ File "deprecated_module_assigment.ml", line 63, characters 4-29: 63 | sig class type c = object end end = ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected signature + File "deprecated_module_assigment.ml", line 71, characters 0-55: 71 | struct module type S = sig end [@@deprecated "FOO"] end ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -123,6 +132,7 @@ File "deprecated_module_assigment.ml", line 70, characters 4-27: 70 | sig module type S = sig end end = ^^^^^^^^^^^^^^^^^^^^^^^ Expected signature + File "deprecated_module_assigment.ml", line 82, characters 0-53: 82 | struct module M = struct end [@@deprecated "FOO"] end ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/warnings/deprecated_module_use.compilers.reference b/testsuite/tests/warnings/deprecated_module_use.compilers.reference index c713064f12..8aa6a2130d 100644 --- a/testsuite/tests/warnings/deprecated_module_use.compilers.reference +++ b/testsuite/tests/warnings/deprecated_module_use.compilers.reference @@ -6,18 +6,22 @@ Alert deprecated: module Deprecated_module As you could guess, Deprecated_module is deprecated. Please use something else! + File "deprecated_module_use.ml", line 20, characters 9-12: 20 | type s = M.t ^^^ Alert deprecated: module Deprecated_module.M + File "deprecated_module_use.ml", line 20, characters 9-12: 20 | type s = M.t ^^^ Alert deprecated: Deprecated_module.M.t + File "deprecated_module_use.ml", line 22, characters 5-6: 22 | open M ^ Alert deprecated: module Deprecated_module.M + File "deprecated_module_use.ml", line 23, characters 8-9: 23 | let _ = x ^ diff --git a/testsuite/tests/warnings/w01.compilers.reference b/testsuite/tests/warnings/w01.compilers.reference index e46fa9de26..bbaf1b6521 100644 --- a/testsuite/tests/warnings/w01.compilers.reference +++ b/testsuite/tests/warnings/w01.compilers.reference @@ -2,25 +2,30 @@ File "w01.ml", line 14, characters 12-14: 14 | let foo = ( *);; ^^ Warning 2 [comment-not-end]: this is not the end of a comment. + File "w01.ml", line 20, characters 0-3: 20 | f 1; f 1;; ^^^ Warning 5 [ignored-partial-application]: this function application is partial, maybe some arguments are missing. + File "w01.ml", line 30, characters 4-5: 30 | let 1 = 1;; ^ Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: 0 + File "w01.ml", line 35, characters 0-1: 35 | 1; 1;; ^ Warning 10 [non-unit-statement]: this expression should have type unit. + File "w01.ml", line 42, characters 2-3: 42 | | 1 -> () ^ Warning 11 [redundant-case]: this match case is unused. + File "w01.ml", line 19, characters 8-9: 19 | let f x y = x;; ^ diff --git a/testsuite/tests/warnings/w03.compilers.reference b/testsuite/tests/warnings/w03.compilers.reference index fc79e8cc5d..f5a24886ce 100644 --- a/testsuite/tests/warnings/w03.compilers.reference +++ b/testsuite/tests/warnings/w03.compilers.reference @@ -2,6 +2,7 @@ File "w03.ml", line 14, characters 8-9: 14 | let _ = A ^ Alert deprecated: A + File "w03.ml", line 17, characters 12-26: 17 | exception B [@@deprecated] ^^^^^^^^^^^^^^ diff --git a/testsuite/tests/warnings/w04_failure.compilers.reference b/testsuite/tests/warnings/w04_failure.compilers.reference index 8b24c6307d..a4b1640cff 100644 --- a/testsuite/tests/warnings/w04_failure.compilers.reference +++ b/testsuite/tests/warnings/w04_failure.compilers.reference @@ -5,6 +5,7 @@ File "w04_failure.ml", lines 20-23, characters 2-17: 23 | | _, _, _ -> () Warning 4 [fragile-match]: this pattern-matching is fragile. It will remain exhaustive when constructors are added to type repr. + File "w04_failure.ml", lines 20-23, characters 2-17: 20 | ..match r1, r2, t with 21 | | AB, _, A -> () @@ -12,6 +13,7 @@ File "w04_failure.ml", lines 20-23, characters 2-17: 23 | | _, _, _ -> () Warning 4 [fragile-match]: this pattern-matching is fragile. It will remain exhaustive when constructors are added to type ab. + File "w04_failure.ml", lines 20-23, characters 2-17: 20 | ..match r1, r2, t with 21 | | AB, _, A -> () diff --git a/testsuite/tests/warnings/w06.compilers.reference b/testsuite/tests/warnings/w06.compilers.reference index 3d46d10e9f..c7dc45bd93 100644 --- a/testsuite/tests/warnings/w06.compilers.reference +++ b/testsuite/tests/warnings/w06.compilers.reference @@ -2,6 +2,7 @@ File "w06.ml", line 16, characters 9-12: 16 | let () = foo 2 ^^^ Warning 6 [labels-omitted]: label bar was omitted in the application of this function. + File "w06.ml", line 17, characters 9-12: 17 | let () = bar 4 2 ^^^ diff --git a/testsuite/tests/warnings/w32.compilers.reference b/testsuite/tests/warnings/w32.compilers.reference index 749342940b..ee080085f5 100644 --- a/testsuite/tests/warnings/w32.compilers.reference +++ b/testsuite/tests/warnings/w32.compilers.reference @@ -2,10 +2,12 @@ File "w32.mli", line 12, characters 10-11: 12 | module F (X : sig val x : int end) : sig end ^ Warning 67 [unused-functor-parameter]: unused functor parameter X. + File "w32.mli", line 14, characters 10-11: 14 | module G (X : sig val x : int end) : sig end ^ Warning 67 [unused-functor-parameter]: unused functor parameter X. + File "w32.mli", line 16, characters 10-11: 16 | module H (X : sig val x : int end) : sig val x : int end ^ @@ -14,50 +16,62 @@ File "w32.ml", line 40, characters 24-25: 40 | let[@warning "-32"] rec q x = x ^ Warning 39 [unused-rec-flag]: unused rec flag. + File "w32.ml", line 43, characters 24-25: 43 | let[@warning "-32"] rec s x = x ^ Warning 39 [unused-rec-flag]: unused rec flag. + File "w32.ml", line 20, characters 4-5: 20 | let h x = x ^ Warning 32 [unused-value-declaration]: unused value h. + File "w32.ml", line 26, characters 4-5: 26 | and j x = x ^ Warning 32 [unused-value-declaration]: unused value j. + File "w32.ml", line 28, characters 4-5: 28 | let k x = x ^ Warning 32 [unused-value-declaration]: unused value k. + File "w32.ml", line 41, characters 4-5: 41 | and r x = x ^ Warning 32 [unused-value-declaration]: unused value r. + File "w32.ml", line 44, characters 20-21: 44 | and[@warning "-39"] t x = x ^ Warning 32 [unused-value-declaration]: unused value t. + File "w32.ml", line 46, characters 24-25: 46 | let[@warning "-39"] rec u x = x ^ Warning 32 [unused-value-declaration]: unused value u. + File "w32.ml", line 47, characters 4-5: 47 | and v x = v x ^ Warning 32 [unused-value-declaration]: unused value v. + File "w32.ml", line 55, characters 22-23: 55 | let[@warning "+32"] g x = x ^ Warning 32 [unused-value-declaration]: unused value g. + File "w32.ml", line 56, characters 22-23: 56 | let[@warning "+32"] h x = x ^ Warning 32 [unused-value-declaration]: unused value h. + File "w32.ml", line 59, characters 22-23: 59 | and[@warning "+32"] k x = x ^ Warning 32 [unused-value-declaration]: unused value k. + File "w32.ml", lines 52-60, characters 0-3: 52 | module M = struct 53 | [@@@warning "-32"] @@ -69,14 +83,17 @@ File "w32.ml", lines 52-60, characters 0-3: 59 | and[@warning "+32"] k x = x 60 | end Warning 60 [unused-module]: unused module M. + File "w32.ml", line 63, characters 18-29: 63 | module F (X : sig val x : int end) = struct end ^^^^^^^^^^^ Warning 32 [unused-value-declaration]: unused value x. + File "w32.ml", line 63, characters 10-11: 63 | module F (X : sig val x : int end) = struct end ^ Warning 60 [unused-module]: unused module X. + File "w32.ml", line 65, characters 18-29: 65 | module G (X : sig val x : int end) = X ^^^^^^^^^^^ diff --git a/testsuite/tests/warnings/w32b.compilers.reference b/testsuite/tests/warnings/w32b.compilers.reference index fdaa92e5bb..c375b18b8b 100644 --- a/testsuite/tests/warnings/w32b.compilers.reference +++ b/testsuite/tests/warnings/w32b.compilers.reference @@ -2,6 +2,7 @@ File "w32b.ml", line 13, characters 18-24: 13 | module Q (M : sig type t end) = struct end ^^^^^^ Warning 34 [unused-type-declaration]: unused type t. + File "w32b.ml", line 13, characters 10-11: 13 | module Q (M : sig type t end) = struct end ^ diff --git a/testsuite/tests/warnings/w33.compilers.reference b/testsuite/tests/warnings/w33.compilers.reference index 6931c1356d..0f84f26a9b 100644 --- a/testsuite/tests/warnings/w33.compilers.reference +++ b/testsuite/tests/warnings/w33.compilers.reference @@ -2,10 +2,12 @@ File "w33.ml", line 19, characters 6-11: 19 | let f M.(x) = x (* useless open *) ^^^^^ Warning 33 [unused-open]: unused open M. + File "w33.ml", line 26, characters 0-7: 26 | open! M (* useless open! *) ^^^^^^^ Warning 66 [unused-open-bang]: unused open! M. + File "w33.ml", line 27, characters 0-6: 27 | open M (* useless open *) ^^^^^^ diff --git a/testsuite/tests/warnings/w45.compilers.reference b/testsuite/tests/warnings/w45.compilers.reference index 93640dd3ee..5cb2b42622 100644 --- a/testsuite/tests/warnings/w45.compilers.reference +++ b/testsuite/tests/warnings/w45.compilers.reference @@ -2,11 +2,13 @@ File "w45.ml", line 24, characters 2-9: 24 | open T2 (* shadow X, which is later used; but not A, see #6762 *) ^^^^^^^ Warning 45 [open-shadow-label-constructor]: this open statement shadows the constructor X (which is later used) + File "w45.ml", line 26, characters 14-15: 26 | let _ = (A, X) (* X belongs to several types *) ^ Warning 41 [ambiguous-name]: X belongs to several types: T2.s T1.s The first one was selected. Please disambiguate if this is wrong. + File "w45.ml", line 23, characters 2-9: 23 | open T1 (* unused open *) ^^^^^^^ diff --git a/testsuite/tests/warnings/w47_inline.compilers.reference b/testsuite/tests/warnings/w47_inline.compilers.reference index f8478ff2f8..46e15a9d92 100644 --- a/testsuite/tests/warnings/w47_inline.compilers.reference +++ b/testsuite/tests/warnings/w47_inline.compilers.reference @@ -2,40 +2,48 @@ File "w47_inline.ml", line 30, characters 20-22: 30 | let[@local never] f2 x = x (* ok *) in ^^ Warning 26 [unused-var]: unused variable f2. + File "w47_inline.ml", line 31, characters 24-26: 31 | let[@local malformed] f3 x = x (* bad payload *) in ^^ Warning 26 [unused-var]: unused variable f3. + File "w47_inline.ml", line 15, characters 23-29: 15 | let d = (fun x -> x) [@inline malformed attribute] (* rejected *) ^^^^^^ Warning 47 [attribute-payload]: illegal payload for attribute 'inline'. It must be either 'never', 'always', 'hint' or empty + File "w47_inline.ml", line 16, characters 23-29: 16 | let e = (fun x -> x) [@inline malformed_attribute] (* rejected *) ^^^^^^ Warning 47 [attribute-payload]: illegal payload for attribute 'inline'. It must be either 'never', 'always', 'hint' or empty + File "w47_inline.ml", line 17, characters 23-29: 17 | let f = (fun x -> x) [@inline : malformed_attribute] (* rejected *) ^^^^^^ Warning 47 [attribute-payload]: illegal payload for attribute 'inline'. It must be either 'never', 'always', 'hint' or empty + File "w47_inline.ml", line 18, characters 23-29: 18 | let g = (fun x -> x) [@inline ? malformed_attribute] (* rejected *) ^^^^^^ Warning 47 [attribute-payload]: illegal payload for attribute 'inline'. It must be either 'never', 'always', 'hint' or empty + File "w47_inline.ml", line 23, characters 15-22: 23 | let k x = (a [@inlined malformed]) x (* rejected *) ^^^^^^^ Warning 47 [attribute-payload]: illegal payload for attribute 'inlined'. It must be either 'never', 'always', 'hint' or empty + File "w47_inline.ml", line 31, characters 7-12: 31 | let[@local malformed] f3 x = x (* bad payload *) in ^^^^^ Warning 47 [attribute-payload]: illegal payload for attribute 'local'. It must be either 'never', 'always', 'maybe' or empty + File "w47_inline.ml", line 32, characters 17-26: 32 | let[@local] f4 x = 2 * x (* not local *) in ^^^^^^^^^ diff --git a/testsuite/tests/warnings/w50.compilers.reference b/testsuite/tests/warnings/w50.compilers.reference index 13c026e39d..78009ff7a8 100644 --- a/testsuite/tests/warnings/w50.compilers.reference +++ b/testsuite/tests/warnings/w50.compilers.reference @@ -2,6 +2,7 @@ File "w50.ml", line 13, characters 2-17: 13 | module L = List ^^^^^^^^^^^^^^^ Warning 60 [unused-module]: unused module L. + File "w50.ml", line 17, characters 2-16: 17 | module Y1 = X1 ^^^^^^^^^^^^^^ diff --git a/testsuite/tests/warnings/w53.compilers.reference b/testsuite/tests/warnings/w53.compilers.reference index 75b910487c..4bd621e752 100644 --- a/testsuite/tests/warnings/w53.compilers.reference +++ b/testsuite/tests/warnings/w53.compilers.reference @@ -2,66 +2,82 @@ File "w53.ml", line 12, characters 4-5: 12 | let h x = x [@inline] (* rejected *) ^ Warning 32 [unused-value-declaration]: unused value h. + File "w53.ml", line 12, characters 14-20: 12 | let h x = x [@inline] (* rejected *) ^^^^^^ Warning 53 [misplaced-attribute]: the "inline" attribute cannot appear in this context + File "w53.ml", line 13, characters 14-26: 13 | let h x = x [@ocaml.inline] (* rejected *) ^^^^^^^^^^^^ Warning 53 [misplaced-attribute]: the "ocaml.inline" attribute cannot appear in this context + File "w53.ml", line 15, characters 14-21: 15 | let i x = x [@inlined] (* rejected *) ^^^^^^^ Warning 53 [misplaced-attribute]: the "inlined" attribute cannot appear in this context + File "w53.ml", line 16, characters 14-27: 16 | let j x = x [@ocaml.inlined] (* rejected *) ^^^^^^^^^^^^^ Warning 53 [misplaced-attribute]: the "ocaml.inlined" attribute cannot appear in this context + File "w53.ml", line 19, characters 16-23: 19 | let l x = h x [@inlined] (* rejected *) ^^^^^^^ Warning 53 [misplaced-attribute]: the "inlined" attribute cannot appear in this context + File "w53.ml", line 21, characters 14-22: 21 | let m x = x [@tailcall] (* rejected *) ^^^^^^^^ Warning 53 [misplaced-attribute]: the "tailcall" attribute cannot appear in this context + File "w53.ml", line 22, characters 14-28: 22 | let n x = x [@ocaml.tailcall] (* rejected *) ^^^^^^^^^^^^^^ Warning 53 [misplaced-attribute]: the "ocaml.tailcall" attribute cannot appear in this context + File "w53.ml", line 25, characters 16-24: 25 | let q x = h x [@tailcall] (* rejected *) ^^^^^^^^ Warning 53 [misplaced-attribute]: the "tailcall" attribute cannot appear in this context + File "w53.ml", line 33, characters 0-32: 33 | module C = struct end [@@inline] (* rejected *) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 53 [misplaced-attribute]: the "inline" attribute cannot appear in this context + File "w53.ml", line 34, characters 0-39: 34 | module C' = struct end [@@ocaml.inline] (* rejected *) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 53 [misplaced-attribute]: the "inline" attribute cannot appear in this context + File "w53.ml", line 40, characters 16-22: 40 | module G = (A [@inline])(struct end) (* rejected *) ^^^^^^ Warning 53 [misplaced-attribute]: the "inline" attribute cannot appear in this context + File "w53.ml", line 41, characters 17-29: 41 | module G' = (A [@ocaml.inline])(struct end) (* rejected *) ^^^^^^^^^^^^ Warning 53 [misplaced-attribute]: the "ocaml.inline" attribute cannot appear in this context + File "w53.ml", line 45, characters 22-29: 45 | module I = Set.Make [@inlined] ^^^^^^^ Warning 53 [misplaced-attribute]: the "inlined" attribute cannot appear in this context + File "w53.ml", line 46, characters 23-36: 46 | module I' = Set.Make [@ocaml.inlined] ^^^^^^^^^^^^^ Warning 53 [misplaced-attribute]: the "ocaml.inlined" attribute cannot appear in this context + File "w53.ml", line 48, characters 23-30: 48 | module J = Set.Make [@@inlined] ^^^^^^^ Warning 53 [misplaced-attribute]: the "inlined" attribute cannot appear in this context + File "w53.ml", line 49, characters 24-37: 49 | module J' = Set.Make [@@ocaml.inlined] ^^^^^^^^^^^^^ diff --git a/testsuite/tests/warnings/w54.compilers.reference b/testsuite/tests/warnings/w54.compilers.reference index 110da823ae..a5075bcfa0 100644 --- a/testsuite/tests/warnings/w54.compilers.reference +++ b/testsuite/tests/warnings/w54.compilers.reference @@ -2,14 +2,17 @@ File "w54.ml", line 12, characters 33-39: 12 | let f = (fun x -> x) [@inline] [@inline never] ^^^^^^ Warning 54 [duplicated-attribute]: the "inline" attribute is used more than once on this expression + File "w54.ml", line 13, characters 51-63: 13 | let g = (fun x -> x) [@inline] [@something_else] [@ocaml.inline] ^^^^^^^^^^^^ Warning 54 [duplicated-attribute]: the "ocaml.inline" attribute is used more than once on this expression + File "w54.ml", line 15, characters 26-39: 15 | let h x = (g [@inlined] [@ocaml.inlined never]) x ^^^^^^^^^^^^^ Warning 54 [duplicated-attribute]: the "ocaml.inlined" attribute is used more than once on this expression + File "w54.ml", line 19, characters 0-43: 19 | let i = ((fun x -> x) [@inline]) [@@inline] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/warnings/w55.flambda.reference b/testsuite/tests/warnings/w55.flambda.reference index 00bd36c074..3c31287f94 100644 --- a/testsuite/tests/warnings/w55.flambda.reference +++ b/testsuite/tests/warnings/w55.flambda.reference @@ -2,10 +2,12 @@ File "w55.ml", line 33, characters 10-26: 33 | let h x = (j [@inlined]) x ^^^^^^^^^^^^^^^^ Warning 55 [inlining-impossible]: Cannot inline: [@inlined] attributes may not be used on partial applications + File "w55.ml", line 29, characters 10-27: 29 | let i x = (!r [@inlined]) x ^^^^^^^^^^^^^^^^^ Warning 55 [inlining-impossible]: Cannot inline: [@inlined] attribute was not used on this function application (the optimizer did not know what function was being applied) + File "w55.ml", line 39, characters 12-30: 39 | let b x y = (a [@inlined]) x y ^^^^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/warnings/w55.native.reference b/testsuite/tests/warnings/w55.native.reference index d701efcb87..63f7fd7a91 100644 --- a/testsuite/tests/warnings/w55.native.reference +++ b/testsuite/tests/warnings/w55.native.reference @@ -2,22 +2,27 @@ File "w55.ml", line 25, characters 10-26: 25 | let g x = (f [@inlined]) x ^^^^^^^^^^^^^^^^ Warning 55 [inlining-impossible]: Cannot inline: Function information unavailable + File "w55.ml", line 29, characters 10-27: 29 | let i x = (!r [@inlined]) x ^^^^^^^^^^^^^^^^^ Warning 55 [inlining-impossible]: Cannot inline: Unknown function + File "w55.ml", line 33, characters 10-26: 33 | let h x = (j [@inlined]) x ^^^^^^^^^^^^^^^^ Warning 55 [inlining-impossible]: Cannot inline: Partial application + File "w55.ml", line 39, characters 12-30: 39 | let b x y = (a [@inlined]) x y ^^^^^^^^^^^^^^^^^^ Warning 55 [inlining-impossible]: Cannot inline: Over-application + File "w55.ml", line 39, characters 12-30: 39 | let b x y = (a [@inlined]) x y ^^^^^^^^^^^^^^^^^^ Warning 55 [inlining-impossible]: Cannot inline: Function information unavailable + File "w55.ml", line 42, characters 10-26: 42 | let d x = (c [@inlined]) x ^^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/warnings/w59.flambda.reference b/testsuite/tests/warnings/w59.flambda.reference index de51e0471e..33f0d7caf3 100644 --- a/testsuite/tests/warnings/w59.flambda.reference +++ b/testsuite/tests/warnings/w59.flambda.reference @@ -4,24 +4,28 @@ File "w59.ml", line 47, characters 2-43: Warning 59 [flambda-assignment-to-non-mutable-value]: A potential assignment to a non-mutable value was detected in this source file. Such assignments may generate incorrect code when using Flambda. + File "w59.ml", line 48, characters 2-43: 48 | Obj.set_field (Obj.repr p) 0 (Obj.repr 3); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 59 [flambda-assignment-to-non-mutable-value]: A potential assignment to a non-mutable value was detected in this source file. Such assignments may generate incorrect code when using Flambda. + File "w59.ml", line 49, characters 2-43: 49 | Obj.set_field (Obj.repr q) 0 (Obj.repr 3); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 59 [flambda-assignment-to-non-mutable-value]: A potential assignment to a non-mutable value was detected in this source file. Such assignments may generate incorrect code when using Flambda. + File "w59.ml", line 50, characters 2-43: 50 | Obj.set_field (Obj.repr r) 0 (Obj.repr 3) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 59 [flambda-assignment-to-non-mutable-value]: A potential assignment to a non-mutable value was detected in this source file. Such assignments may generate incorrect code when using Flambda. + File "w59.ml", line 57, characters 2-7: 57 | set o ^^^^^ diff --git a/testsuite/tests/warnings/w68.compilers.reference b/testsuite/tests/warnings/w68.compilers.reference index 198706c310..0fb87c1952 100644 --- a/testsuite/tests/warnings/w68.compilers.reference +++ b/testsuite/tests/warnings/w68.compilers.reference @@ -4,6 +4,7 @@ File "w68.ml", line 34, characters 33-43: Warning 8 [partial-match]: this pattern-matching is not exhaustive. Here is an example of a case that is not matched: Some _ + File "w68.ml", line 14, characters 10-13: 14 | let alloc {a} b = a + b ^^^ -- cgit v1.2.1