@@ -3572,7 +3572,7 @@ and translate_unified_ops (env : Env.t) (funct : Typedtree.expression)
3572
3572
| Texp_ident (path , _ , _ ) -> (
3573
3573
let entry = Hashtbl. find_opt Unified_ops. index_by_path (Path. name path) in
3574
3574
match (entry, sargs) with
3575
- | Some {form = Unary ; specialization; _} , [(Nolabel , lhs_expr)] ->
3575
+ | Some {form = Unary ; specialization; _} , [(lhs_label , lhs_expr)] ->
3576
3576
let lhs = type_exp env lhs_expr in
3577
3577
let lhs_type = expand_head env lhs.exp_type in
3578
3578
let result_type =
@@ -3595,10 +3595,10 @@ and translate_unified_ops (env : Env.t) (funct : Typedtree.expression)
3595
3595
unify env lhs_type Predef. type_int;
3596
3596
Predef. type_int
3597
3597
in
3598
- let targs = [(Nolabel , Some lhs)] in
3598
+ let targs = [(lhs_label , Some lhs)] in
3599
3599
Some (targs, result_type)
3600
3600
| ( Some {form = Binary ; specialization; _},
3601
- [(Nolabel , lhs_expr); (Nolabel , rhs_expr)] ) ->
3601
+ [(lhs_label , lhs_expr); (rhs_label , rhs_expr)] ) ->
3602
3602
let lhs = type_exp env lhs_expr in
3603
3603
let lhs_type = expand_head env lhs.exp_type in
3604
3604
let rhs = type_exp env rhs_expr in
@@ -3648,12 +3648,12 @@ and translate_unified_ops (env : Env.t) (funct : Typedtree.expression)
3648
3648
let lhs = type_expect env lhs_expr Predef. type_string in
3649
3649
(lhs, rhs, Predef. type_string)
3650
3650
| _ ->
3651
- (* Rule 2 . Fallback to int *)
3651
+ (* Rule 3 . Fallback to int *)
3652
3652
let lhs = type_expect env lhs_expr Predef. type_int in
3653
3653
let rhs = type_expect env rhs_expr Predef. type_int in
3654
3654
(lhs, rhs, Predef. type_int))
3655
3655
in
3656
- let targs = [(Nolabel , Some lhs); (Nolabel , Some rhs)] in
3656
+ let targs = [(lhs_label , Some lhs); (rhs_label , Some rhs)] in
3657
3657
Some (targs, result_type)
3658
3658
| _ -> None )
3659
3659
| _ -> None
0 commit comments