@@ -2567,7 +2567,6 @@ and type_expect_ ~context ?in_function ?(recarg = Rejected) env sexp ty_expected
25672567 get_jsx_component_props ~extract_concrete_typedecl env ty_record p
25682568 | None -> None
25692569 in
2570- (* React.fragmentProps, JSXDOM.domProps *)
25712570 let jsx_component_error_info = get_jsx_component_error_info () in
25722571 let lbl_exp_list =
25732572 wrap_disambiguate " This record expression is expected to have" ty_record
@@ -2922,8 +2921,6 @@ and type_expect_ ~context ?in_function ?(recarg = Rejected) env sexp ty_expected
29222921 let cty', force = Typetexp. transl_simple_type_delayed env sty' in
29232922 let ty' = cty'.ctyp_type in
29242923 if separate then begin_def () ;
2925- (* TODO: What should this be?*)
2926- let type_clash_context = None in
29272924 let arg = type_exp ~context: None env sarg in
29282925 let gen =
29292926 if separate then (
@@ -2933,10 +2930,7 @@ and type_expect_ ~context ?in_function ?(recarg = Rejected) env sexp ty_expected
29332930 (try unify_var env tv arg.exp_type
29342931 with Unify trace ->
29352932 raise
2936- (Error
2937- ( arg.exp_loc,
2938- env,
2939- Expr_type_clash {trace; context = type_clash_context} )));
2933+ (Error (arg.exp_loc, env, Expr_type_clash {trace; context = None })));
29402934 gen)
29412935 else true
29422936 in
@@ -3745,7 +3739,7 @@ and type_construct ~context env loc lid sarg ty_expected attrs =
37453739 }
37463740 in
37473741 (* Forward context if this is a Some constructor injected (meaning it's
3748- an optional field or an optional argument ) *)
3742+ an optional field) *)
37493743 let context =
37503744 match lid.txt with
37513745 | Longident. Ldot (Lident "*predef*" , "Some" ) -> (
@@ -3754,8 +3748,6 @@ and type_construct ~context env loc lid sarg ty_expected attrs =
37543748 Some
37553749 (Error_message_utils. RecordField
37563750 {record_type; jsx; field_name; optional = true })
3757- | Some (FunctionArgument _ ) ->
3758- Some (Error_message_utils. FunctionArgument {optional = true })
37593751 | _ -> None )
37603752 | _ -> None
37613753 in
0 commit comments