diff --git a/CHANGELOG.md b/CHANGELOG.md index 71c7d3be11..f238068159 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,10 +12,6 @@ # 10.1.0-rc.3 -#### :bug: Bug Fix - -- Fix issue where exhaustiveness check for pattern matching char was not working https://github.com/rescript-lang/rescript-compiler/issues/5557 - # 10.1.0-rc.2 #### :bug: Bug Fix diff --git a/jscomp/ml/typecore.ml b/jscomp/ml/typecore.ml index 4dbc11b7c7..012cdd765c 100644 --- a/jscomp/ml/typecore.ml +++ b/jscomp/ml/typecore.ml @@ -1350,11 +1350,6 @@ let partial_pred ~lev ?mode ?explode env expected_ty constrs labels p = let state = save_state env in try reset_pattern None true; - let expected_ty = match p.ppat_desc, expected_ty.desc with - | Ppat_constant (Pconst_integer _ ), Tconstr (path, [], _) when Path.same path Predef.path_char -> - (* Constants such as 'x' are represented as Pconst_integer but expected to have type char *) - Predef.type_int - | _ -> expected_ty in let typed_p = Ctype.with_passive_variants (type_pat ~allow_existentials:true ~lev diff --git a/lib/4.06.1/unstable/js_compiler.ml b/lib/4.06.1/unstable/js_compiler.ml index d4dca29dfe..0e6879f617 100644 --- a/lib/4.06.1/unstable/js_compiler.ml +++ b/lib/4.06.1/unstable/js_compiler.ml @@ -40301,11 +40301,6 @@ let partial_pred ~lev ?mode ?explode env expected_ty constrs labels p = let state = save_state env in try reset_pattern None true; - let expected_ty = match p.ppat_desc, expected_ty.desc with - | Ppat_constant (Pconst_integer _ ), Tconstr (path, [], _) when Path.same path Predef.path_char -> - (* Constants such as 'x' are represented as Pconst_integer but expected to have type char *) - Predef.type_int - | _ -> expected_ty in let typed_p = Ctype.with_passive_variants (type_pat ~allow_existentials:true ~lev diff --git a/lib/4.06.1/unstable/js_playground_compiler.ml b/lib/4.06.1/unstable/js_playground_compiler.ml index 22e7d91b52..314e28560a 100644 --- a/lib/4.06.1/unstable/js_playground_compiler.ml +++ b/lib/4.06.1/unstable/js_playground_compiler.ml @@ -40301,11 +40301,6 @@ let partial_pred ~lev ?mode ?explode env expected_ty constrs labels p = let state = save_state env in try reset_pattern None true; - let expected_ty = match p.ppat_desc, expected_ty.desc with - | Ppat_constant (Pconst_integer _ ), Tconstr (path, [], _) when Path.same path Predef.path_char -> - (* Constants such as 'x' are represented as Pconst_integer but expected to have type char *) - Predef.type_int - | _ -> expected_ty in let typed_p = Ctype.with_passive_variants (type_pat ~allow_existentials:true ~lev diff --git a/lib/4.06.1/whole_compiler.ml b/lib/4.06.1/whole_compiler.ml index 0ec973290c..396eb85143 100644 --- a/lib/4.06.1/whole_compiler.ml +++ b/lib/4.06.1/whole_compiler.ml @@ -216688,11 +216688,6 @@ let partial_pred ~lev ?mode ?explode env expected_ty constrs labels p = let state = save_state env in try reset_pattern None true; - let expected_ty = match p.ppat_desc, expected_ty.desc with - | Ppat_constant (Pconst_integer _ ), Tconstr (path, [], _) when Path.same path Predef.path_char -> - (* Constants such as 'x' are represented as Pconst_integer but expected to have type char *) - Predef.type_int - | _ -> expected_ty in let typed_p = Ctype.with_passive_variants (type_pat ~allow_existentials:true ~lev