Skip to content

Commit b08060b

Browse files
committed
[ConstraintSystem] Fix mistake involving comparison to extension.
We need to compare the Decl for the nominal we're extending, not the extension decl itself.
1 parent b9d0a49 commit b08060b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Sema/CSSolver.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1733,7 +1733,8 @@ void ConstraintSystem::partitionDisjunction(
17331733
}
17341734

17351735
if (auto *extensionDecl = dyn_cast<ExtensionDecl>(parentDecl)) {
1736-
if (static_cast<Decl *>(extensionDecl) == designatedProtocol) {
1736+
parentDecl = extensionDecl->getExtendedNominal();
1737+
if (parentDecl == designatedProtocol) {
17371738
definedInExtensionOfDesignatedType.push_back(index);
17381739
return true;
17391740
}

0 commit comments

Comments
 (0)