Skip to content

Commit d166035

Browse files
committed
[Gardening] Move the Documentation for getOpenedArchetypeSignature
1 parent 0026a30 commit d166035

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

include/swift/AST/ASTContext.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,15 @@ class ASTContext final {
13001300
/// Retrieve a generic signature with a single type parameter conforming
13011301
/// to the given protocol or composition type, like <T: type>.
13021302
CanGenericSignature getOpenedArchetypeSignature(Type type);
1303+
/// to the given protocol or composition type, like <T: P>.
1304+
///
1305+
/// The opened archetype may have a different set of conformances from the
1306+
/// corresponding existential. The opened archetype conformances are dictated
1307+
/// by the ABI for generic arguments, while the existential value conformances
1308+
/// are dictated by their layout (see \c Type::getExistentialLayout()). In
1309+
/// particular, the opened archetype signature does not have requirements for
1310+
/// conformances inherited from superclass constraints while existential
1311+
/// values do.
13031312

13041313
GenericSignature getOverrideGenericSignature(const ValueDecl *base,
13051314
const ValueDecl *derived);

lib/AST/ASTContext.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5166,13 +5166,6 @@ CanGenericSignature ASTContext::getSingleGenericParameterSignature() const {
51665166
return canonicalSig;
51675167
}
51685168

5169-
// Return the signature for an opened existential. The opened archetype may have
5170-
// a different set of conformances from the corresponding existential. The
5171-
// opened archetype conformances are dictated by the ABI for generic arguments,
5172-
// while the existential value conformances are dictated by their layout (see
5173-
// Type::getExistentialLayout()). In particular, the opened archetype signature
5174-
// does not have requirements for conformances inherited from superclass
5175-
// constraints while existential values do.
51765169
CanGenericSignature ASTContext::getOpenedArchetypeSignature(Type type) {
51775170
assert(type->isExistentialType());
51785171
if (auto existential = type->getAs<ExistentialType>())

0 commit comments

Comments
 (0)