Skip to content

Commit 6946f1b

Browse files
committed
AST: Remove OpenedArchetypeType::getSelfInterfaceTypeFromContext()
1 parent 891f93f commit 6946f1b

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

include/swift/AST/Types.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6785,15 +6785,6 @@ class OpenedArchetypeType final : public LocalArchetypeType,
67856785
ArrayRef<ProtocolDecl *> conformsTo, Type superclass,
67866786
LayoutConstraint layout);
67876787

6788-
public:
6789-
/// Compute the parameter that serves as the \c Self type for an opened
6790-
/// archetype from the given outer generic signature.
6791-
///
6792-
/// This type is a generic parameter one level deeper
6793-
/// than the deepest generic context depth.
6794-
static Type getSelfInterfaceTypeFromContext(GenericSignature parentSig,
6795-
ASTContext &ctx);
6796-
67976788
public:
67986789
/// Get or create an archetype that represents the opened type
67996790
/// of an existential value.

lib/AST/ASTContext.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6137,13 +6137,6 @@ CanGenericSignature ASTContext::getSingleGenericParameterSignature() const {
61376137
return canonicalSig;
61386138
}
61396139

6140-
Type OpenedArchetypeType::getSelfInterfaceTypeFromContext(GenericSignature parentSig,
6141-
ASTContext &ctx) {
6142-
return GenericTypeParamType::get(/*isParameterPack=*/ false,
6143-
parentSig.getNextDepth(), /*index=*/ 0,
6144-
ctx);
6145-
}
6146-
61476140
CanGenericSignature
61486141
ASTContext::getOpenedExistentialSignature(Type type, GenericSignature parentSig) {
61496142
assert(type->isExistentialType());
@@ -6206,7 +6199,7 @@ ASTContext::getOpenedExistentialSignature(Type type) {
62066199

62076200
// Stash the `Self` type.
62086201
existentialSig.SelfType =
6209-
OpenedArchetypeType::getSelfInterfaceTypeFromContext(parentSig, *this)
6202+
existentialSig.OpenedSig.getGenericParams().back()
62106203
->getCanonicalType();
62116204

62126205
// Cache the result.

0 commit comments

Comments
 (0)