Skip to content

Commit a5ebaab

Browse files
committed
AST: Fix a misleading comment
Fixes <https://bugs.swift.org/browse/SR-9403>.
1 parent e62795e commit a5ebaab

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

include/swift/AST/Decl.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2913,9 +2913,6 @@ class GenericTypeParamDecl : public AbstractTypeParamDecl {
29132913
/// func getNext() -> Element?
29142914
/// }
29152915
/// \endcode
2916-
///
2917-
/// Every protocol has an implicitly-created associated type 'Self' that
2918-
/// describes a type that conforms to the protocol.
29192916
class AssociatedTypeDecl : public AbstractTypeParamDecl {
29202917
/// The location of the initial keyword.
29212918
SourceLoc KeywordLoc;
@@ -3875,6 +3872,14 @@ struct SelfReferenceKind {
38753872
/// protocol Drawable {
38763873
/// func draw()
38773874
/// }
3875+
///
3876+
/// Every protocol has an implicitly-created 'Self' generic parameter that
3877+
/// stands for a type that conforms to the protocol. For example,
3878+
///
3879+
/// protocol Cloneable {
3880+
/// func clone() -> Self
3881+
/// }
3882+
///
38783883
class ProtocolDecl final : public NominalTypeDecl {
38793884
SourceLoc ProtocolLoc;
38803885

0 commit comments

Comments
 (0)