@@ -1037,7 +1037,7 @@ let build_other_constant proj make first next p env =
1037
1037
1038
1038
let some_other_tag = " <some other tag>"
1039
1039
1040
- let build_other ext env = match env with
1040
+ let build_other ext env : Typedtree.pattern = match env with
1041
1041
| ({pat_desc = Tpat_construct (lid , {cstr_tag =Cstr_extension _ } ,_ )} ,_ ) :: _ ->
1042
1042
(* let c = {c with cstr_name = "*extension*"} in *) (* PR#7330 *)
1043
1043
make_pat (Tpat_var (Ident. create " *extension*" ,
@@ -1079,13 +1079,19 @@ let build_other ext env = match env with
1079
1079
make_pat (Tpat_or (pat, p_res, None )) p.pat_type p.pat_env)
1080
1080
pat other_pats
1081
1081
end
1082
- | ({pat_desc =(Tpat_constant (Const_int _ | Const_char _ ))} as p ,_ ) :: _ ->
1082
+ | ({pat_desc =(Tpat_constant (Const_int _ ))} as p ,_ ) :: _ ->
1083
1083
build_other_constant
1084
1084
(function Tpat_constant (Const_int i ) -> i
1085
- | Tpat_constant (Const_char i ) -> Char. code i
1086
1085
| _ -> assert false )
1087
1086
(function i -> Tpat_constant (Const_int i))
1088
1087
0 succ p env
1088
+ | ({pat_desc =(Tpat_constant (Const_char _ ))} as p ,_ ) :: _ ->
1089
+ build_other_constant
1090
+ (function
1091
+ | Tpat_constant (Const_char i ) -> i
1092
+ | _ -> assert false )
1093
+ (function i -> Tpat_constant (Const_char i))
1094
+ 0 succ p env
1089
1095
| ({pat_desc =(Tpat_constant (Const_int32 _ ))} as p ,_ ) :: _ ->
1090
1096
build_other_constant
1091
1097
(function Tpat_constant (Const_int32 i ) -> i | _ -> assert false )
0 commit comments