@@ -7484,12 +7484,7 @@ fn expression_<'a>(
74847484 name,
74857485 callee_loc.dupe(),
74867486 )?;
7487- let reason_call = mk_reason(
7488- VirtualReasonDesc::RConstructorCall(
7489- desc_of_t(&id_t).cloned().map(Arc::new),
7490- ),
7491- loc.dupe(),
7492- );
7487+ let reason_call = mk_reason(None, loc.dupe());
74937488 let use_op =
74947489 UseOp::Op(Arc::new(type_::RootUseOp::FunCall(Box::new(FunCallData {
74957490 op: reason.dupe(),
@@ -7551,10 +7546,7 @@ fn expression_<'a>(
75517546 }
75527547 None => (vec![], vec![], None),
75537548 };
7554- let reason = mk_reason(
7555- VirtualReasonDesc::RConstructorCall(desc_of_t(&class_).cloned().map(Arc::new)),
7556- loc.dupe(),
7557- );
7549+ let reason = mk_reason(None, loc.dupe());
75587550 let use_op = UseOp::Op(Arc::new(type_::RootUseOp::FunCall(Box::new(FunCallData {
75597551 op: mk_expression_reason(e),
75607552 fn_: mk_expression_reason(&inner.callee),
@@ -7943,10 +7935,7 @@ fn expression_<'a>(
79437935 let tag_ast = expression(None, None, None, cx, &inner.tag)?;
79447936 let (targts, targs_ast) = convert_call_targs_opt(cx, inner.targs.as_ref())?;
79457937 let t = tag_ast.loc().1.dupe();
7946- let reason = mk_reason(
7947- RFunctionCall(desc_of_t(&t).cloned().map(Arc::new)),
7948- loc.dupe(),
7949- );
7938+ let reason = mk_reason(None, loc.dupe());
79507939 let reason_array = mk_reason(VirtualReasonDesc::RArray, reason.loc().dupe());
79517940 let ret_id = flow_typing_tvar::mk_no_wrap(cx, &reason);
79527941 let ret_tvar = Tvar::new(reason.dupe(), ret_id as u32);
@@ -9148,12 +9137,7 @@ pub fn optional_chain<'a>(
91489137 } = inner.callee.deref() =>
91499138 {
91509139 let (targts, targs) = convert_call_targs_opt(cx, inner.targs.as_ref())?;
9151- let reason = mk_reason(
9152- VirtualReasonDesc::RFunctionCall(Some(
9153- VirtualReasonDesc::RCode(FlowSmolStr::new_inline("super")).into(),
9154- )),
9155- loc.dupe(),
9156- );
9140+ let reason = mk_reason(None, loc.dupe());
91579141 let super_t = super_(cx, super_loc.dupe())?;
91589142 let (argts, arguments_ast) = arg_list(cx, &inner.arguments)?;
91599143 let super_reason = reason_of_t(&super_t).dupe();
@@ -10642,12 +10626,7 @@ pub fn optional_chain<'a>(
1064210626 };
1064310627 let get_reason: Box<dyn Fn(&Type) -> Reason + '_> = {
1064410628 let loc = loc.dupe();
10645- Box::new(move |lhs_t: &Type| {
10646- mk_reason(
10647- RFunctionCall(desc_of_t(lhs_t).cloned().map(Arc::new)),
10648- loc.dupe(),
10649- )
10650- })
10629+ Box::new(move |_lhs_t: &Type| mk_reason(None, loc.dupe()))
1065110630 };
1065210631 let get_result: Box<
1065310632 dyn Fn(&mut Context<'a>, &Vec<CallArg>, Reason, &Type) -> Result<Type, JobError>,
@@ -13851,10 +13830,7 @@ fn non_react_jsx_desugar<'a>(
1385113830 attributes: &[ast::jsx::OpeningAttribute<ALoc, ALoc>],
1385213831 children: Vec<type_::UnresolvedParam>,
1385313832) -> Result<(Type, Option<Type>, Option<Type>), CheckExprError> {
13854- let reason = mk_reason(
13855- VirtualReasonDesc::RJSXFunctionCall(FlowSmolStr::from(raw_jsx_expr)),
13856- loc_element.dupe(),
13857- );
13833+ let reason = mk_reason(None, loc_element.dupe());
1385813834 // A JSX element with no attributes should pass in null as the second arg
1385913835 let props = if attributes.is_empty() {
1386013836 type_::null::at(loc_opening.dupe())
0 commit comments