diff --git a/testsuite/tests/typing-modal-kinds/basics.ml b/testsuite/tests/typing-modal-kinds/basics.ml index 2b597146c75..1c4d099fa63 100644 --- a/testsuite/tests/typing-modal-kinds/basics.ml +++ b/testsuite/tests/typing-modal-kinds/basics.ml @@ -280,22 +280,14 @@ val int_duplicate : int = 5 let string_list_duplicate = let once_ x : string list = ["hi";"bye"] in Fun.id x -(* CR layouts v2.8: this should succeed *) [%%expect{| -Line 1, characters 79-80: -1 | let string_list_duplicate = let once_ x : string list = ["hi";"bye"] in Fun.id x - ^ -Error: This value is "once" but expected to be "many". +val string_list_duplicate : string list = ["hi"; "bye"] |}] let int_list_duplicate = let once_ x : int list = [4;5] in Fun.id x -(* CR layouts v2.8: this should succeed *) [%%expect{| -Line 1, characters 66-67: -1 | let int_list_duplicate = let once_ x : int list = [4;5] in Fun.id x - ^ -Error: This value is "once" but expected to be "many". +val int_list_duplicate : int list = [4; 5] |}] let hidden_string_duplicate = @@ -332,12 +324,8 @@ let hidden_int_list_duplicate = [Hidden_int.hide 2; Hidden_int.hide 3] in Fun.id x -(* CR layouts v2.8: this should succeed *) [%%expect{| -Line 4, characters 12-13: -4 | in Fun.id x - ^ -Error: This value is "once" but expected to be "many". +val hidden_int_list_duplicate : Hidden_int.t list = [; ] |}] let float_duplicate = let once_ x : float = 3.14 in Fun.id x @@ -375,23 +363,15 @@ val hidden_int64_u_duplicate : unit -> Hidden_int64_u.t = let float_u_record_duplicate = let once_ x : float_u_record = { x = #3.14; y = #2.718 } in Fun.id x -(* CR layouts v2.8: this should succeed *) [%%expect{| -Line 2, characters 69-70: -2 | let once_ x : float_u_record = { x = #3.14; y = #2.718 } in Fun.id x - ^ -Error: This value is "once" but expected to be "many". +val float_u_record_duplicate : float_u_record = {x = ; y = } |}] let float_u_record_list_duplicate = let once_ x : float_u_record list = [] in Fun.id x -(* CR layouts v2.8: this should succeed *) [%%expect{| -Line 2, characters 51-52: -2 | let once_ x : float_u_record list = [] in Fun.id x - ^ -Error: This value is "once" but expected to be "many". +val float_u_record_list_duplicate : float_u_record list = [] |}] let function_duplicate = let once_ x : int -> int = fun y -> y in Fun.id x diff --git a/testsuite/tests/typing-modal-kinds/expected_mode.ml b/testsuite/tests/typing-modal-kinds/expected_mode.ml index b6a43567333..24c5edc3442 100644 --- a/testsuite/tests/typing-modal-kinds/expected_mode.ml +++ b/testsuite/tests/typing-modal-kinds/expected_mode.ml @@ -222,10 +222,7 @@ Error: This value is "once" but expected to be "many". let int_list_duplicate : once_ _ -> int list = fun x -> x [%%expect{| -Line 1, characters 56-57: -1 | let int_list_duplicate : once_ _ -> int list = fun x -> x - ^ -Error: This value is "once" but expected to be "many". +val int_list_duplicate : int list @ once -> int list = |}] let hidden_string_duplicate : once_ _ -> Hidden_string.t = @@ -268,10 +265,8 @@ let float_u_record_duplicate : once_ _ -> float_u_record = fun x -> x [%%expect{| -Line 2, characters 11-12: -2 | fun x -> x - ^ -Error: This value is "once" but expected to be "many". +val float_u_record_duplicate : float_u_record @ once -> float_u_record = + |}] let float_u_record_list_duplicate : @@ -279,10 +274,8 @@ let float_u_record_list_duplicate : fun x -> x [%%expect{| -Line 3, characters 11-12: -3 | fun x -> x - ^ -Error: This value is "once" but expected to be "many". +val float_u_record_list_duplicate : + float_u_record list @ once -> float_u_record list = |}] let function_duplicate : once_ _ -> (int -> int) = fun x -> x