Skip to content

Commit 82cbcf1

Browse files
committed
Sema: Remove some code from checkTypeWitness() that no longer appears to be needed
1 parent b891b56 commit 82cbcf1

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4763,21 +4763,6 @@ swift::checkTypeWitness(Type type, AssociatedTypeDecl *assocType,
47634763
KnownProtocolKind::Sendable))
47644764
.isInvalid())
47654765
return CheckTypeWitnessResult::forConformance(reqProto);
4766-
4767-
// FIXME: Why is conformsToProtocol() not enough? The stdlib doesn't
4768-
// build unless we fail here while inferring an associated type
4769-
// somewhere.
4770-
if (contextType->isSpecialized()) {
4771-
auto *decl = contextType->getAnyNominal();
4772-
auto subMap = contextType->getContextSubstitutionMap(
4773-
module,
4774-
decl,
4775-
decl->getGenericEnvironmentOfContext());
4776-
for (auto replacement : subMap.getReplacementTypes()) {
4777-
if (replacement->hasError())
4778-
return CheckTypeWitnessResult::forConformance(reqProto);
4779-
}
4780-
}
47814766
}
47824767

47834768
if (sig->requiresClass(depTy) &&

0 commit comments

Comments
 (0)