Skip to content

Commit 6a4d5f2

Browse files
committed
expand comments tracking work left to do
1 parent 82de431 commit 6a4d5f2

File tree

1 file changed

+28
-10
lines changed

1 file changed

+28
-10
lines changed

compiler/ml/ctype.ml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3793,10 +3793,17 @@ let rec subtype_rec env trace t1 t2 cstrs =
37933793
try
37943794
let lst = subtype_list env trace tl1 tl2 cstrs in
37953795
if List.length lst = List.length cstrs then None
3796-
else Some [ (* TODO(subtype-errors) *) ]
3797-
with _ -> Some [ (* TODO(subtype-errors) *) ])
3796+
else
3797+
Some
3798+
[ (* TODO(subtype-errors) Variant constructor inline record mismatch *) ]
3799+
with _ ->
3800+
Some
3801+
[ (* TODO(subtype-errors) Variant constructor inline record mismatch *) ]
3802+
)
37983803
| violations -> Some violations
3799-
else Some [ (* TODO(subtype-errors) *) ]
3804+
else
3805+
Some
3806+
[ (* TODO(subtype-errors) Variant constructor representation mismatch*) ]
38003807
| ( {
38013808
Types.cd_args = Cstr_tuple tl1;
38023809
cd_attributes = c1_attributes;
@@ -3813,16 +3820,22 @@ let rec subtype_rec env trace t1 t2 cstrs =
38133820
try
38143821
let lst = subtype_list env trace tl1 tl2 cstrs in
38153822
if List.length lst = List.length cstrs then None
3816-
else Some [ (* TODO(subtype-errors) *) ]
3817-
with _ -> Some [ (* TODO(subtype-errors) *) ]
3818-
else Some [ (* TODO(subtype-errors) *) ]
3819-
| _ -> Some [ (* TODO(subtype-errors) *) ])
3823+
else
3824+
Some
3825+
[ (* TODO(subtype-errors) Variant constructor tuple mismatch *) ]
3826+
with _ ->
3827+
Some
3828+
[ (* TODO(subtype-errors) Variant constructor tuple mismatch *) ]
3829+
else
3830+
Some
3831+
[ (* TODO(subtype-errors) Variant constructor tuple mismatch *) ]
3832+
| _ ->
3833+
Some [ (* TODO(subtype-errors) Variant other issue *) ])
38203834
in
38213835
if field_subtype_violations = [] then cstrs
38223836
else (trace, t1, t2, !univar_pairs, None) :: cstrs)
38233837
| ( (p1, _, {type_kind = Type_record (fields1, repr1)}),
38243838
(p2, _, {type_kind = Type_record (fields2, repr2)}) ) ->
3825-
(* TODO(subtype-errors) Record representation *)
38263839
let same_repr =
38273840
match (repr1, repr2) with
38283841
| Record_regular, Record_regular ->
@@ -3850,7 +3863,13 @@ let rec subtype_rec env trace t1 t2 cstrs =
38503863
}) )
38513864
:: cstrs
38523865
else subtype_list env trace tl1 tl2 cstrs
3853-
else (trace, t1, t2, !univar_pairs, None) :: cstrs
3866+
else
3867+
( trace,
3868+
t1,
3869+
t2,
3870+
!univar_pairs,
3871+
None (* TODO(subtype-errors) Record representation *) )
3872+
:: cstrs
38543873
| (p1, _, {type_kind = tk1}), (p2, _, {type_kind = tk2}) ->
38553874
( trace,
38563875
t1,
@@ -3880,7 +3899,6 @@ let rec subtype_rec env trace t1 t2 cstrs =
38803899
when extract_concrete_typedecl_opt env t2
38813900
|> Variant_coercion.type_is_variant -> (
38823901
(* TODO(subtype-errors) Polyvariant to variant *)
3883-
(* TODO(subtype-errors) Add Variant to polyvariant while we're at it? *)
38843902
match extract_concrete_typedecl env t2 with
38853903
| _, _, {type_kind = Type_variant variant_constructors; type_attributes}
38863904
-> (

0 commit comments

Comments
 (0)