@@ -1037,7 +1037,7 @@ let build_other_constant proj make first next p env =
10371037
10381038let some_other_tag = " <some other tag>"
10391039
1040- let build_other ext env = match env with
1040+ let build_other ext env : Typedtree.pattern = match env with
10411041| ({pat_desc = Tpat_construct (lid , {cstr_tag =Cstr_extension _ } ,_ )} ,_ ) :: _ ->
10421042 (* let c = {c with cstr_name = "*extension*"} in *) (* PR#7330 *)
10431043 make_pat (Tpat_var (Ident. create " *extension*" ,
@@ -1079,13 +1079,19 @@ let build_other ext env = match env with
10791079 make_pat (Tpat_or (pat, p_res, None )) p.pat_type p.pat_env)
10801080 pat other_pats
10811081 end
1082- | ({pat_desc =(Tpat_constant (Const_int _ | Const_char _ ))} as p ,_ ) :: _ ->
1082+ | ({pat_desc =(Tpat_constant (Const_int _ ))} as p ,_ ) :: _ ->
10831083 build_other_constant
10841084 (function Tpat_constant (Const_int i ) -> i
1085- | Tpat_constant (Const_char i ) -> Char. code i
10861085 | _ -> assert false )
10871086 (function i -> Tpat_constant (Const_int i))
10881087 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
10891095| ({pat_desc =(Tpat_constant (Const_int32 _ ))} as p ,_ ) :: _ ->
10901096 build_other_constant
10911097 (function Tpat_constant (Const_int32 i ) -> i | _ -> assert false )
0 commit comments