@@ -92,11 +92,10 @@ static DeclContext *getDisjunctionDC(Constraint *disjunction) {
9292 auto *choice = disjunction->getNestedConstraints ()[0 ];
9393 switch (choice->getKind ()) {
9494 case ConstraintKind::BindOverload:
95- return choice->getOverloadUseDC ();
9695 case ConstraintKind::ValueMember:
9796 case ConstraintKind::UnresolvedValueMember:
9897 case ConstraintKind::ValueWitness:
99- return choice->getMemberUseDC ();
98+ return choice->getDeclContext ();
10099 default :
101100 return nullptr ;
102101 }
@@ -366,7 +365,7 @@ static ValueDecl *isViableOverloadChoice(ConstraintSystem &cs,
366365 // we might end up favoring an overload that would be diagnosed
367366 // as unavailable later.
368367 if (cs.getASTContext ().LangOpts .hasFeature (Feature::MemberImportVisibility)) {
369- if (auto *useDC = constraint->getOverloadUseDC ()) {
368+ if (auto *useDC = constraint->getDeclContext ()) {
370369 if (!useDC->isDeclImported (decl))
371370 return nullptr ;
372371 }
@@ -562,7 +561,7 @@ void forEachDisjunctionChoice(
562561
563562 Type overloadType = cs.getEffectiveOverloadType (
564563 disjunction->getLocator (), constraint->getOverloadChoice (),
565- /* allowMembers=*/ true , constraint->getOverloadUseDC ());
564+ /* allowMembers=*/ true , constraint->getDeclContext ());
566565
567566 if (!overloadType || !overloadType->is <FunctionType>())
568567 continue ;
0 commit comments