Skip to content

Commit a2a3d5d

Browse files
committed
AST: Remove dead code path in ExistentialLayout::getSuperclass()
1 parent f423301 commit a2a3d5d

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/AST/Type.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -407,14 +407,9 @@ Type ExistentialLayout::getSuperclass() const {
407407
return explicitSuperclass;
408408

409409
for (auto protoDecl : getProtocols()) {
410-
// If we have a generic signature, check there, because it
411-
// will pick up superclass constraints from protocols that we
412-
// refine as well.
413-
if (auto genericSig = protoDecl->getGenericSignature()) {
414-
if (auto superclass = genericSig->getSuperclassBound(
415-
protoDecl->getSelfInterfaceType()))
416-
return superclass;
417-
} else if (auto superclass = protoDecl->getSuperclass())
410+
auto genericSig = protoDecl->getGenericSignature();
411+
if (auto superclass = genericSig->getSuperclassBound(
412+
protoDecl->getSelfInterfaceType()))
418413
return superclass;
419414
}
420415

0 commit comments

Comments
 (0)