Skip to content

Commit 3d8a791

Browse files
committed
fix rebase conflicts
1 parent 00fbcf9 commit 3d8a791

File tree

4 files changed

+15
-215
lines changed

4 files changed

+15
-215
lines changed

ocaml/testsuite/tests/typing-layouts-err-msg/value.ml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -414,15 +414,11 @@ type t = {a: t_void; b: int}
414414
let f (x: t) = match x with | {a; b} -> a
415415
[%%expect {|
416416
type t = { a : t_void; b : int; }
417-
Line 2, characters 6-41:
417+
Line 2, characters 15-41:
418418
2 | let f (x: t) = match x with | {a; b} -> a
419-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
420-
Error: Non-value detected in [value_kind].
421-
Please report this error to the Jane Street compilers team.
422-
The layout of t_void is void, because
423-
of the definition of t_void at line 6, characters 0-19.
424-
But the layout of t_void must be a sublayout of value, because
425-
it has to be value for the V1 safety check.
419+
^^^^^^^^^^^^^^^^^^^^^^^^^^
420+
Error: Non-value layout void detected in [Typeopt.layout] as sort for type
421+
t_void. Please report this error to the Jane Street compilers team.
426422
|}]
427423

428424
(* Captured_in_object *)

ocaml/testsuite/tests/typing-layouts/basics_alpha.ml

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@ Line 2, characters 16-44:
212212
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
213213
Error: Non-value detected in [value_kind].
214214
Please report this error to the Jane Street compilers team.
215-
t_void has layout void, which is not a sublayout of value.
215+
The layout of t_void is void, because
216+
of the definition of t_void at line 6, characters 0-19.
217+
But the layout of t_void must be a sublayout of value, because
218+
it has to be value for the V1 safety check.
216219
|}];;
217220

218221
(**************************************)
@@ -420,21 +423,8 @@ let g (x : 'a void5) =
420423
Lines 2-3, characters 2-16:
421424
2 | ..match x with
422425
3 | | Void5 x -> x..
423-
<<<<<<< HEAD
424426
Error: Non-value layout void detected in [Typeopt.layout] as sort for type
425427
'a. Please report this error to the Jane Street compilers team.
426-
||||||| parent of c77b6af8 (Enable layout histories (#1823))
427-
Error: Non-value detected in [value_kind].
428-
Please report this error to the Jane Street compilers team.
429-
'a has layout void, which is not a sublayout of value.
430-
=======
431-
Error: Non-value detected in [value_kind].
432-
Please report this error to the Jane Street compilers team.
433-
The layout of 'a is void, because
434-
of the definition of void5 at line 1, characters 0-37.
435-
But the layout of 'a must be a sublayout of value, because
436-
it has to be value for the V1 safety check.
437-
>>>>>>> c77b6af8 (Enable layout histories (#1823))
438428
|}]
439429

440430
(****************************************)
@@ -844,24 +834,9 @@ end;;
844834
[%%expect{|
845835
Line 4, characters 32-33:
846836
4 | let foo o (A x) = o # usevoid x
847-
<<<<<<< HEAD
848837
^
849838
Error: Non-value layout void detected in [Typeopt.layout] as sort for type
850839
'a. Please report this error to the Jane Street compilers team.
851-
||||||| parent of c77b6af8 (Enable layout histories (#1823))
852-
^^^^^^^^^^^^^^^^^^^^^
853-
Error: Non-value detected in [value_kind].
854-
Please report this error to the Jane Street compilers team.
855-
'a has layout void, which is not a sublayout of value.
856-
=======
857-
^^^^^^^^^^^^^^^^^^^^^
858-
Error: Non-value detected in [value_kind].
859-
Please report this error to the Jane Street compilers team.
860-
The layout of 'a is void, because
861-
of the definition of t at line 2, characters 2-30.
862-
But the layout of 'a must be a sublayout of value, because
863-
it has to be value for the V1 safety check.
864-
>>>>>>> c77b6af8 (Enable layout histories (#1823))
865840
|}];;
866841

867842
module M11_4 = struct

ocaml/testsuite/tests/typing-layouts/void_alpha.ml

Lines changed: 6 additions & 165 deletions
Original file line numberDiff line numberDiff line change
@@ -481,16 +481,10 @@ Lines 4-11, characters 2-24:
481481
11 | b2 = (cons_r 2; {v})}
482482
Error: Non-value detected in [value_kind].
483483
Please report this error to the Jane Street compilers team.
484-
<<<<<<< HEAD
485-
void_rec has layout void, which is not a sublayout of value.
486-
||||||| parent of c77b6af8 (Enable layout histories (#1823))
487-
t_void has layout void, which is not a sublayout of value.
488-
=======
489-
The layout of t_void is void, because
484+
The layout of void_rec is void, because
490485
of the definition of t_void at line 1, characters 0-18.
491-
But the layout of t_void must be a sublayout of value, because
486+
But the layout of void_rec must be a sublayout of value, because
492487
it has to be value for the V1 safety check.
493-
>>>>>>> c77b6af8 (Enable layout histories (#1823))
494488
|}]
495489
(* CR layouts v5: This was the expected behavior before removing the handling of
496490
void for lambda, and we expected it to be the expected behavior again after
@@ -516,16 +510,10 @@ Lines 2-3, characters 2-32:
516510
3 | (x, V b2.v, V b1.v, z, V a1.v)
517511
Error: Non-value detected in [value_kind].
518512
Please report this error to the Jane Street compilers team.
519-
<<<<<<< HEAD
520-
t_void has layout void, which is not a sublayout of value.
521-
||||||| parent of c77b6af8 (Enable layout histories (#1823))
522-
void_rec has layout void, which is not a sublayout of value.
523-
=======
524-
The layout of void_rec is void, because
513+
The layout of t_void is void, because
525514
of the definition of t_void at line 1, characters 0-18.
526-
But the layout of void_rec must be a sublayout of value, because
515+
But the layout of t_void must be a sublayout of value, because
527516
it has to be value for the V1 safety check.
528-
>>>>>>> c77b6af8 (Enable layout histories (#1823))
529517
|}]
530518
(* CR layouts v5: This was the expected behavior before removing the handling of
531519
void for lambda, and we expected it to be the expected behavior again after
@@ -621,47 +609,12 @@ let [@warning "-10"] exnmatch1 (V v) =
621609

622610
let _ = assert ((exnmatch1 vh) = 1);;
623611
[%%expect{|
624-
<<<<<<< HEAD
625612
Lines 3-5, characters 4-46:
626613
3 | ....{v = (if true then raise (Ex1 42); v)};
627614
4 | if true then raise (Ex2 "test");
628615
5 | {v = ((if true then raise (Ex3 true)); v)}
629616
Error: Non-value layout void detected in [Typeopt.layout] as sort for type
630617
void_rec. Please report this error to the Jane Street compilers team.
631-
||||||| parent of c77b6af8 (Enable layout histories (#1823))
632-
Lines 1-13, characters 31-24:
633-
1 | ...............................(V v) =
634-
2 | match
635-
3 | {v = (if true then raise (Ex1 42); v)};
636-
4 | if true then raise (Ex2 "test");
637-
5 | {v = ((if true then raise (Ex3 true)); v)}
638-
...
639-
10 | | exception Ex2 "test" -> 3
640-
11 | | exception Ex2 _ -> 4
641-
12 | | exception Ex3 true -> 5
642-
13 | | exception Ex3 _ -> 6
643-
Error: Non-value detected in [value_kind].
644-
Please report this error to the Jane Street compilers team.
645-
t_void has layout void, which is not a sublayout of value.
646-
=======
647-
Lines 1-13, characters 31-24:
648-
1 | ...............................(V v) =
649-
2 | match
650-
3 | {v = (if true then raise (Ex1 42); v)};
651-
4 | if true then raise (Ex2 "test");
652-
5 | {v = ((if true then raise (Ex3 true)); v)}
653-
...
654-
10 | | exception Ex2 "test" -> 3
655-
11 | | exception Ex2 _ -> 4
656-
12 | | exception Ex3 true -> 5
657-
13 | | exception Ex3 _ -> 6
658-
Error: Non-value detected in [value_kind].
659-
Please report this error to the Jane Street compilers team.
660-
The layout of t_void is void, because
661-
of the definition of t_void at line 1, characters 0-18.
662-
But the layout of t_void must be a sublayout of value, because
663-
it has to be value for the V1 safety check.
664-
>>>>>>> c77b6af8 (Enable layout histories (#1823))
665618
|}]
666619
(* CR layouts v5: This was the expected behavior before removing the handling of
667620
void for lambda, and we expected it to be the expected behavior again after
@@ -687,47 +640,12 @@ let [@warning "-10"] exnmatch2 (V v) =
687640

688641
let _ = assert ((exnmatch2 vh) = 3);;
689642
[%%expect{|
690-
<<<<<<< HEAD
691643
Lines 3-5, characters 4-46:
692644
3 | ....{v = v};
693645
4 | if true then raise (Ex2 "test");
694646
5 | {v = ((if true then raise (Ex3 true)); v)}
695647
Error: Non-value layout void detected in [Typeopt.layout] as sort for type
696648
void_rec. Please report this error to the Jane Street compilers team.
697-
||||||| parent of c77b6af8 (Enable layout histories (#1823))
698-
Lines 1-13, characters 31-24:
699-
1 | ...............................(V v) =
700-
2 | match
701-
3 | {v = v};
702-
4 | if true then raise (Ex2 "test");
703-
5 | {v = ((if true then raise (Ex3 true)); v)}
704-
...
705-
10 | | exception Ex2 "test" -> 3
706-
11 | | exception Ex2 _ -> 4
707-
12 | | exception Ex3 true -> 5
708-
13 | | exception Ex3 _ -> 6
709-
Error: Non-value detected in [value_kind].
710-
Please report this error to the Jane Street compilers team.
711-
t_void has layout void, which is not a sublayout of value.
712-
=======
713-
Lines 1-13, characters 31-24:
714-
1 | ...............................(V v) =
715-
2 | match
716-
3 | {v = v};
717-
4 | if true then raise (Ex2 "test");
718-
5 | {v = ((if true then raise (Ex3 true)); v)}
719-
...
720-
10 | | exception Ex2 "test" -> 3
721-
11 | | exception Ex2 _ -> 4
722-
12 | | exception Ex3 true -> 5
723-
13 | | exception Ex3 _ -> 6
724-
Error: Non-value detected in [value_kind].
725-
Please report this error to the Jane Street compilers team.
726-
The layout of t_void is void, because
727-
of the definition of t_void at line 1, characters 0-18.
728-
But the layout of t_void must be a sublayout of value, because
729-
it has to be value for the V1 safety check.
730-
>>>>>>> c77b6af8 (Enable layout histories (#1823))
731649
|}]
732650
(* CR layouts v5: This was the expected behavior before removing the handling of
733651
void for lambda, and we expected it to be the expected behavior again after
@@ -752,46 +670,11 @@ let [@warning "-10"] exnmatch3 (V v) =
752670

753671
let _ = assert ((exnmatch3 vh) = 5);;
754672
[%%expect{|
755-
<<<<<<< HEAD
756673
Lines 3-4, characters 4-46:
757674
3 | ....{v = v};
758675
4 | {v = ((if true then raise (Ex3 true)); v)}
759676
Error: Non-value layout void detected in [Typeopt.layout] as sort for type
760677
void_rec. Please report this error to the Jane Street compilers team.
761-
||||||| parent of c77b6af8 (Enable layout histories (#1823))
762-
Lines 1-12, characters 31-24:
763-
1 | ...............................(V v) =
764-
2 | match
765-
3 | {v = v};
766-
4 | {v = ((if true then raise (Ex3 true)); v)}
767-
5 | with
768-
...
769-
9 | | exception Ex2 "test" -> 3
770-
10 | | exception Ex2 _ -> 4
771-
11 | | exception Ex3 true -> 5
772-
12 | | exception Ex3 _ -> 6
773-
Error: Non-value detected in [value_kind].
774-
Please report this error to the Jane Street compilers team.
775-
t_void has layout void, which is not a sublayout of value.
776-
=======
777-
Lines 1-12, characters 31-24:
778-
1 | ...............................(V v) =
779-
2 | match
780-
3 | {v = v};
781-
4 | {v = ((if true then raise (Ex3 true)); v)}
782-
5 | with
783-
...
784-
9 | | exception Ex2 "test" -> 3
785-
10 | | exception Ex2 _ -> 4
786-
11 | | exception Ex3 true -> 5
787-
12 | | exception Ex3 _ -> 6
788-
Error: Non-value detected in [value_kind].
789-
Please report this error to the Jane Street compilers team.
790-
The layout of t_void is void, because
791-
of the definition of t_void at line 1, characters 0-18.
792-
But the layout of t_void must be a sublayout of value, because
793-
it has to be value for the V1 safety check.
794-
>>>>>>> c77b6af8 (Enable layout histories (#1823))
795678
|}]
796679
(* CR layouts v5: This was the expected behavior before removing the handling of
797680
void for lambda, and we expected it to be the expected behavior again after
@@ -816,46 +699,11 @@ let [@warning "-10"] exnmatch4 (V v) =
816699

817700
let _ = assert ((exnmatch4 vh) = 0);;
818701
[%%expect{|
819-
<<<<<<< HEAD
820702
Lines 3-4, characters 4-11:
821703
3 | ....{v = v};
822704
4 | {v = v}
823705
Error: Non-value layout void detected in [Typeopt.layout] as sort for type
824706
void_rec. Please report this error to the Jane Street compilers team.
825-
||||||| parent of c77b6af8 (Enable layout histories (#1823))
826-
Lines 1-12, characters 31-24:
827-
1 | ...............................(V v) =
828-
2 | match
829-
3 | {v = v};
830-
4 | {v = v}
831-
5 | with
832-
...
833-
9 | | exception Ex2 "test" -> 3
834-
10 | | exception Ex2 _ -> 4
835-
11 | | exception Ex3 true -> 5
836-
12 | | exception Ex3 _ -> 6
837-
Error: Non-value detected in [value_kind].
838-
Please report this error to the Jane Street compilers team.
839-
t_void has layout void, which is not a sublayout of value.
840-
=======
841-
Lines 1-12, characters 31-24:
842-
1 | ...............................(V v) =
843-
2 | match
844-
3 | {v = v};
845-
4 | {v = v}
846-
5 | with
847-
...
848-
9 | | exception Ex2 "test" -> 3
849-
10 | | exception Ex2 _ -> 4
850-
11 | | exception Ex3 true -> 5
851-
12 | | exception Ex3 _ -> 6
852-
Error: Non-value detected in [value_kind].
853-
Please report this error to the Jane Street compilers team.
854-
The layout of t_void is void, because
855-
of the definition of t_void at line 1, characters 0-18.
856-
But the layout of t_void must be a sublayout of value, because
857-
it has to be value for the V1 safety check.
858-
>>>>>>> c77b6af8 (Enable layout histories (#1823))
859707
|}]
860708
(* CR layouts v5: This was the expected behavior before removing the handling of
861709
void for lambda, and we expected it to be the expected behavior again after
@@ -934,17 +782,10 @@ Lines 9-18, characters 2-29:
934782
18 | cons_r uivrh.uivrh_x; uivrh
935783
Error: Non-value detected in [value_kind].
936784
Please report this error to the Jane Street compilers team.
937-
<<<<<<< HEAD
938-
unboxed_inlined_void_rec has layout void,
939-
which is not a sublayout of value.
940-
||||||| parent of c77b6af8 (Enable layout histories (#1823))
941-
t_void has layout void, which is not a sublayout of value.
942-
=======
943-
The layout of t_void is void, because
785+
The layout of unboxed_inlined_void_rec is void, because
944786
of the definition of t_void at line 1, characters 0-18.
945-
But the layout of t_void must be a sublayout of value, because
787+
But the layout of unboxed_inlined_void_rec must be a sublayout of value, because
946788
it has to be value for the V1 safety check.
947-
>>>>>>> c77b6af8 (Enable layout histories (#1823))
948789
|}]
949790
(* CR layouts v5: This was the expected behavior before removing the handling of
950791
void for lambda, and we expected it to be the expected behavior again after

ocaml/typing/jkind.ml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,23 +1081,11 @@ end = struct
10811081
| External_argument ->
10821082
fprintf ppf "it's the type of an argument in an external declaration"
10831083
| External_result ->
1084-
<<<<<<< HEAD
1085-
fprintf ppf "used as the result of an external declaration"
1086-
| Statement -> fprintf ppf "used as a statement"
1087-
| Optional_arg_default -> fprintf ppf "used as an optional argument default"
1088-
| Wildcard -> fprintf ppf "a _ in a type"
1089-
| Unification_var -> fprintf ppf "a fresh unification variable"
1090-
||||||| parent of c77b6af8 (Enable layout histories (#1823))
1091-
fprintf ppf "used as the result of an external declaration"
1092-
| Statement -> fprintf ppf "used as a statement"
1093-
| Wildcard -> fprintf ppf "a _ in a type"
1094-
| Unification_var -> fprintf ppf "a fresh unification variable"
1095-
=======
10961084
fprintf ppf "it's the type of the result of an external declaration"
10971085
| Statement -> fprintf ppf "it's the type of a statement"
10981086
| Wildcard -> fprintf ppf "it's a _ in the type"
10991087
| Unification_var -> fprintf ppf "it's a fresh unification variable"
1100-
>>>>>>> c77b6af8 (Enable layout histories (#1823))
1088+
| Optional_arg_default -> fprintf ppf "it's the type of an optional argument default"
11011089

11021090
let rec format_annotation_context ppf : annotation_context -> unit = function
11031091
| Type_declaration p ->

0 commit comments

Comments
 (0)