File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -10401,6 +10401,24 @@ bool ConstraintSystem::simplifyAppliedOverloadsImpl(
10401
10401
}
10402
10402
}
10403
10403
10404
+ // Disabled overloads need special handling depending mode.
10405
+ if (constraint->isDisabled ()) {
10406
+ // In diagnostic mode, invalidate previous common result type if
10407
+ // current overload choice has a fix to make sure that we produce
10408
+ // the best diagnostics possible.
10409
+ if (shouldAttemptFixes ()) {
10410
+ if (constraint->getFix ())
10411
+ commonResultType = ErrorType::get (getASTContext ());
10412
+ return true ;
10413
+ }
10414
+
10415
+ // In performance mode, let's skip the disabled overload choice
10416
+ // and continue - this would make sure that common result type
10417
+ // could be found if one exists among the overloads the solver
10418
+ // is actually going to attempt.
10419
+ return false ;
10420
+ }
10421
+
10404
10422
// Determine the type that this choice will have.
10405
10423
Type choiceType = getEffectiveOverloadType (
10406
10424
constraint->getLocator (), choice, /* allowMembers=*/ true ,
You can’t perform that action at this time.
0 commit comments