mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema: Remove non-experimental associated type inference
This commit is contained in:
@@ -563,14 +563,6 @@ NormalProtocolConformance::getAssociatedConformance(Type assocType,
|
||||
forEachAssociatedConformance(
|
||||
[&](Type t, ProtocolDecl *p, unsigned index) {
|
||||
if (t->isEqual(assocType) && p == protocol) {
|
||||
if (!ctx.LangOpts.EnableExperimentalAssociatedTypeInference) {
|
||||
// Fill in the signature conformances, if we haven't done so yet.
|
||||
if (!hasComputedAssociatedConformances()) {
|
||||
const_cast<NormalProtocolConformance *>(this)
|
||||
->finishSignatureConformances();
|
||||
}
|
||||
}
|
||||
|
||||
// Not strictly necessary, but avoids a bit of request evaluator
|
||||
// overhead in the happy case.
|
||||
if (hasComputedAssociatedConformances()) {
|
||||
@@ -632,28 +624,6 @@ void NormalProtocolConformance::setAssociatedConformance(
|
||||
AssociatedConformances[index] = assocConf;
|
||||
}
|
||||
|
||||
/// Collect conformances for the requirement signature.
|
||||
void NormalProtocolConformance::finishSignatureConformances() {
|
||||
if (Loader)
|
||||
resolveLazyInfo();
|
||||
|
||||
if (hasComputedAssociatedConformances())
|
||||
return;
|
||||
|
||||
createAssociatedConformanceArray();
|
||||
|
||||
auto &ctx = getDeclContext()->getASTContext();
|
||||
|
||||
forEachAssociatedConformance(
|
||||
[&](Type origTy, ProtocolDecl *reqProto, unsigned index) {
|
||||
auto canTy = origTy->getCanonicalType();
|
||||
evaluateOrDefault(ctx.evaluator,
|
||||
AssociatedConformanceRequest{this, canTy, reqProto, index},
|
||||
ProtocolConformanceRef::forInvalid());
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
Witness RootProtocolConformance::getWitness(ValueDecl *requirement) const {
|
||||
ROOT_CONFORMANCE_SUBCLASS_DISPATCH(getWitness, (requirement))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user