@@ -3675,45 +3675,6 @@ bool FailureDiagnosis::visitApplyExpr(ApplyExpr *callExpr) {
3675
3675
overloadName, lhsType, rhsType);
3676
3676
diag.highlight (lhsExpr->getSourceRange ())
3677
3677
.highlight (rhsExpr->getSourceRange ());
3678
-
3679
- auto tryFixIts = [&]() -> bool {
3680
- if (calleeInfo.size () != 1 )
3681
- return false ;
3682
-
3683
- auto candidate = calleeInfo[0 ];
3684
- auto *fnType = candidate.getFunctionType ();
3685
- if (!fnType)
3686
- return false ;
3687
-
3688
- auto params = fnType->getParams ();
3689
- if (params.size () != 2 )
3690
- return false ;
3691
-
3692
- auto lhsCandidate = params[0 ].getOldType ();
3693
- auto rhsCandidate = params[1 ].getOldType ();
3694
- auto lhsIsCandidate = lhsType->isEqual (lhsCandidate);
3695
- auto rhsIsCandidate = rhsType->isEqual (rhsCandidate);
3696
-
3697
- if (!lhsIsCandidate && !rhsIsCandidate)
3698
- return false ;
3699
-
3700
- if (!lhsIsCandidate) {
3701
- ContextualFailure failure (expr, CS, lhsType, lhsCandidate,
3702
- CS.getConstraintLocator (lhsExpr));
3703
- return failure.tryIntegerCastFixIts (diag);
3704
- }
3705
-
3706
- if (!rhsIsCandidate) {
3707
- ContextualFailure failure (expr, CS, rhsType, rhsCandidate,
3708
- CS.getConstraintLocator (rhsExpr));
3709
- return failure.tryIntegerCastFixIts (diag);
3710
- }
3711
-
3712
- return false ;
3713
- };
3714
-
3715
- tryFixIts ();
3716
-
3717
3678
} else {
3718
3679
diagnose (callExpr->getLoc (), diag::cannot_apply_binop_to_same_args,
3719
3680
overloadName, lhsType)
0 commit comments