mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Hide _UnderscoredProtocols in code completion
We explicitly whitelist these "stdlib private" decls in interface generation, because they may contain methods that users are required to implement. But in code-completion, there's no good reason to show them. We still show completions for the methods themselves if you complete on a public protocol that inherits from the private protocol. So, <complete> => doesn't show _CollectionType let a: CollectionType = ... a.<complete> => *does* show startIndex, which comes from _CollectionType rdar://problem/20086106 Swift SVN r26355
This commit is contained in:
@@ -1733,7 +1733,7 @@ public:
|
||||
// Implement swift::VisibleDeclConsumer.
|
||||
void foundDecl(ValueDecl *D, DeclVisibilityKind Reason) override {
|
||||
// Hide private stdlib declarations.
|
||||
if (D->isPrivateStdlibDecl())
|
||||
if (D->isPrivateStdlibDecl(/*whitelistProtocols*/false))
|
||||
return;
|
||||
if (AvailabilityAttr::isUnavailable(D))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user