Properly print protocols that inherit marker protocols under $MarkerProtocol

This commit is contained in:
Doug Gregor
2021-02-08 22:37:13 -08:00
parent aa139a101c
commit 627e4f03a3
3 changed files with 55 additions and 20 deletions

View File

@@ -252,8 +252,8 @@ class InheritedProtocolCollector {
if (!isPublicOrUsableFromInline(type))
return false;
// Extensions can print marker protocols.
if (isa<ExtensionDecl>(D))
// Extensions and protocols can print marker protocols.
if (isa<ExtensionDecl>(D) || isa<ProtocolDecl>(D))
return true;
ExistentialLayout layout = type->getExistentialLayout();