@@ -2570,7 +2570,6 @@ and type_expect_ ~context ?in_function ?(recarg = Rejected) env sexp ty_expected
25702570 get_jsx_component_props ~extract_concrete_typedecl env ty_record p
25712571 | None -> None
25722572 in
2573- (* React.fragmentProps, JSXDOM.domProps *)
25742573 let jsx_component_error_info = get_jsx_component_error_info () in
25752574 let lbl_exp_list =
25762575 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
29252924 let cty', force = Typetexp. transl_simple_type_delayed env sty' in
29262925 let ty' = cty'.ctyp_type in
29272926 if separate then begin_def () ;
2928- (* TODO: What should this be?*)
2929- let type_clash_context = None in
29302927 let arg = type_exp ~context: None env sarg in
29312928 let gen =
29322929 if separate then (
@@ -2936,10 +2933,7 @@ and type_expect_ ~context ?in_function ?(recarg = Rejected) env sexp ty_expected
29362933 (try unify_var env tv arg.exp_type
29372934 with Unify trace ->
29382935 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 })));
29432937 gen)
29442938 else true
29452939 in
@@ -3748,7 +3742,7 @@ and type_construct ~context env loc lid sarg ty_expected attrs =
37483742 }
37493743 in
37503744 (* Forward context if this is a Some constructor injected (meaning it's
3751- an optional field or an optional argument ) *)
3745+ an optional field) *)
37523746 let context =
37533747 match lid.txt with
37543748 | Longident. Ldot (Lident "*predef*" , "Some" ) -> (
@@ -3757,8 +3751,6 @@ and type_construct ~context env loc lid sarg ty_expected attrs =
37573751 Some
37583752 (Error_message_utils. RecordField
37593753 {record_type; jsx; field_name; optional = true })
3760- | Some (FunctionArgument _ ) ->
3761- Some (Error_message_utils. FunctionArgument {optional = true })
37623754 | _ -> None )
37633755 | _ -> None
37643756 in
0 commit comments