@@ -92,11 +92,10 @@ static DeclContext *getDisjunctionDC(Constraint *disjunction) {
92
92
auto *choice = disjunction->getNestedConstraints ()[0 ];
93
93
switch (choice->getKind ()) {
94
94
case ConstraintKind::BindOverload:
95
- return choice->getOverloadUseDC ();
96
95
case ConstraintKind::ValueMember:
97
96
case ConstraintKind::UnresolvedValueMember:
98
97
case ConstraintKind::ValueWitness:
99
- return choice->getMemberUseDC ();
98
+ return choice->getDeclContext ();
100
99
default :
101
100
return nullptr ;
102
101
}
@@ -366,7 +365,7 @@ static ValueDecl *isViableOverloadChoice(ConstraintSystem &cs,
366
365
// we might end up favoring an overload that would be diagnosed
367
366
// as unavailable later.
368
367
if (cs.getASTContext ().LangOpts .hasFeature (Feature::MemberImportVisibility)) {
369
- if (auto *useDC = constraint->getOverloadUseDC ()) {
368
+ if (auto *useDC = constraint->getDeclContext ()) {
370
369
if (!useDC->isDeclImported (decl))
371
370
return nullptr ;
372
371
}
@@ -562,7 +561,7 @@ void forEachDisjunctionChoice(
562
561
563
562
Type overloadType = cs.getEffectiveOverloadType (
564
563
disjunction->getLocator (), constraint->getOverloadChoice (),
565
- /* allowMembers=*/ true , constraint->getOverloadUseDC ());
564
+ /* allowMembers=*/ true , constraint->getDeclContext ());
566
565
567
566
if (!overloadType || !overloadType->is <FunctionType>())
568
567
continue ;
0 commit comments