Skip to content

Commit 4e3dafd

Browse files
committed
AST: Remove ProtocolConformanceRef::getInheritedConformanceRef()
1 parent 644b6ad commit 4e3dafd

File tree

2 files changed

+0
-36
lines changed

2 files changed

+0
-36
lines changed

include/swift/AST/ProtocolConformanceRef.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,6 @@ class ProtocolConformanceRef {
153153
/// Get any additional requirements that are required for this conformance to
154154
/// be satisfied.
155155
ArrayRef<Requirement> getConditionalRequirements() const;
156-
157-
/// If this is a conformance reference for a protocol that inherits other
158-
/// protocols, get a reference to the related conformance for the inherited
159-
/// protocol.
160-
ProtocolConformanceRef getInheritedConformanceRef(ProtocolDecl *base) const;
161156
};
162157

163158
} // end namespace swift

lib/AST/ProtocolConformance.cpp

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -487,37 +487,6 @@ ProtocolConformanceRef::getConditionalRequirements() const {
487487
return {};
488488
}
489489

490-
ProtocolConformanceRef
491-
ProtocolConformanceRef::getInheritedConformanceRef(ProtocolDecl *base) const {
492-
if (isAbstract()) {
493-
assert(getRequirement()->inheritsFrom(base));
494-
return ProtocolConformanceRef(base);
495-
}
496-
497-
auto concrete = getConcrete();
498-
auto proto = concrete->getProtocol();
499-
auto path =
500-
proto->getGenericSignature()->getConformanceAccessPath(
501-
proto->getSelfInterfaceType(), base);
502-
ProtocolConformanceRef result = *this;
503-
Type resultType = concrete->getType();
504-
bool first = true;
505-
for (const auto &step : path) {
506-
if (first) {
507-
assert(step.first->isEqual(proto->getSelfInterfaceType()));
508-
assert(step.second == proto);
509-
first = false;
510-
continue;
511-
}
512-
513-
result =
514-
result.getAssociatedConformance(resultType, step.first, step.second);
515-
resultType = result.getAssociatedType(resultType, step.first);
516-
}
517-
518-
return result;
519-
}
520-
521490
void NormalProtocolConformance::differenceAndStoreConditionalRequirements()
522491
const {
523492
switch (CRState) {

0 commit comments

Comments
 (0)