Merge pull request #25445 from slavapestov/testable-protocol-override

Fix crash when refining protocol from a testable import
This commit is contained in:
Slava Pestov
2019-06-13 20:49:51 -07:00
committed by GitHub
4 changed files with 19 additions and 6 deletions

View File

@@ -7190,8 +7190,7 @@ inline bool Decl::isPotentiallyOverridable() const {
isa<SubscriptDecl>(this) ||
isa<FuncDecl>(this) ||
isa<DestructorDecl>(this)) {
return getDeclContext()->getSelfClassDecl() ||
isa<ProtocolDecl>(getDeclContext());
return getDeclContext()->getSelfClassDecl();
} else {
return false;
}