@@ -2570,7 +2570,6 @@ and type_expect_ ~context ?in_function ?(recarg = Rejected) env sexp ty_expected
2570
2570
get_jsx_component_props ~extract_concrete_typedecl env ty_record p
2571
2571
| None -> None
2572
2572
in
2573
- (* React.fragmentProps, JSXDOM.domProps *)
2574
2573
let jsx_component_error_info = get_jsx_component_error_info () in
2575
2574
let lbl_exp_list =
2576
2575
wrap_disambiguate " This record expression is expected to have" ty_record
@@ -2925,8 +2924,6 @@ and type_expect_ ~context ?in_function ?(recarg = Rejected) env sexp ty_expected
2925
2924
let cty', force = Typetexp. transl_simple_type_delayed env sty' in
2926
2925
let ty' = cty'.ctyp_type in
2927
2926
if separate then begin_def () ;
2928
- (* TODO: What should this be?*)
2929
- let type_clash_context = None in
2930
2927
let arg = type_exp ~context: None env sarg in
2931
2928
let gen =
2932
2929
if separate then (
@@ -2936,10 +2933,7 @@ and type_expect_ ~context ?in_function ?(recarg = Rejected) env sexp ty_expected
2936
2933
(try unify_var env tv arg.exp_type
2937
2934
with Unify trace ->
2938
2935
raise
2939
- (Error
2940
- ( arg.exp_loc,
2941
- env,
2942
- Expr_type_clash {trace; context = type_clash_context} )));
2936
+ (Error (arg.exp_loc, env, Expr_type_clash {trace; context = None })));
2943
2937
gen)
2944
2938
else true
2945
2939
in
@@ -3748,7 +3742,7 @@ and type_construct ~context env loc lid sarg ty_expected attrs =
3748
3742
}
3749
3743
in
3750
3744
(* Forward context if this is a Some constructor injected (meaning it's
3751
- an optional field or an optional argument ) *)
3745
+ an optional field) *)
3752
3746
let context =
3753
3747
match lid.txt with
3754
3748
| Longident. Ldot (Lident "*predef*" , "Some" ) -> (
@@ -3757,8 +3751,6 @@ and type_construct ~context env loc lid sarg ty_expected attrs =
3757
3751
Some
3758
3752
(Error_message_utils. RecordField
3759
3753
{record_type; jsx; field_name; optional = true })
3760
- | Some (FunctionArgument _ ) ->
3761
- Some (Error_message_utils. FunctionArgument {optional = true })
3762
3754
| _ -> None )
3763
3755
| _ -> None
3764
3756
in
0 commit comments