Skip to content

Commit 4954278

Browse files
committed
IDE: Don't call getContextSubstitutionMap() on an existential type
1 parent 4549089 commit 4954278

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Sema/IDETypeCheckingRequests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@ static bool isExtensionAppliedInternal(const DeclContext *DC, Type BaseTy,
177177

178178
static bool isMemberDeclAppliedInternal(const DeclContext *DC, Type BaseTy,
179179
const ValueDecl *VD) {
180-
if (BaseTy->isExistentialType() && VD->isStatic() &&
181-
!isExtensionWithSelfBound(
180+
if (BaseTy->isExistentialType() && VD->isStatic()) {
181+
return isExtensionWithSelfBound(
182182
dyn_cast<ExtensionDecl>(VD->getDeclContext()),
183-
dyn_cast_or_null<ProtocolDecl>(BaseTy->getAnyNominal())))
184-
return false;
183+
dyn_cast_or_null<ProtocolDecl>(BaseTy->getAnyNominal()));
184+
}
185185

186186
// We can't leak type variables into another constraint system.
187187
// We can't do anything if the base type has unbound generic parameters.

0 commit comments

Comments
 (0)