Skip to content

Commit 82de431

Browse files
committed
cleanup
1 parent ded8f2b commit 82de431

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

compiler/ml/ctype.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3719,7 +3719,7 @@ let rec subtype_rec env trace t1 t2 cstrs =
37193719
(p2, _, {type_kind = Type_variant c2; type_attributes = t2attrs}) )
37203720
-> (
37213721
match
3722-
Variant_coercion.variant_configuration_can_be_coerced2 t1attrs
3722+
Variant_coercion.variant_configuration_can_be_coerced t1attrs
37233723
t2attrs
37243724
with
37253725
| Error issue ->

compiler/ml/variant_coercion.ml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ type variant_configuration_issue =
178178
| Tag_name_not_matching of {left_tag: string option; right_tag: string option}
179179
| Incompatible_constructor_count of {constructor_names: string list}
180180

181-
let variant_configuration_can_be_coerced2 (a1 : Parsetree.attributes)
181+
let variant_configuration_can_be_coerced (a1 : Parsetree.attributes)
182182
(a2 : Parsetree.attributes) =
183183
let unboxed =
184184
match
@@ -205,29 +205,6 @@ let variant_configuration_can_be_coerced2 (a1 : Parsetree.attributes)
205205
| Ok (), Ok () -> Ok ()
206206
| Error e, _ | _, Error e -> Error e
207207

208-
let variant_configuration_can_be_coerced (a1 : Parsetree.attributes)
209-
(a2 : Parsetree.attributes) =
210-
let unboxed =
211-
match
212-
( Ast_untagged_variants.process_untagged a1,
213-
Ast_untagged_variants.process_untagged a2 )
214-
with
215-
| true, true | false, false -> true
216-
| _ -> false
217-
in
218-
if not unboxed then false
219-
else
220-
let tag =
221-
match
222-
( Ast_untagged_variants.process_tag_name a1,
223-
Ast_untagged_variants.process_tag_name a2 )
224-
with
225-
| Some tag1, Some tag2 when tag1 = tag2 -> true
226-
| None, None -> true
227-
| _ -> false
228-
in
229-
if not tag then false else true
230-
231208
let variant_configuration_can_be_coerced_raises ~is_spread_context ~left_loc
232209
~right_loc ~(left_attributes : Parsetree.attributes)
233210
~(right_attributes : Parsetree.attributes) =

0 commit comments

Comments
 (0)