mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Simplify the interface to Module::lookupConformance.
Rather than returning a weird PointerIntPair, return an Optional<ProtocolConformanceRef>. NFC
This commit is contained in:
@@ -358,12 +358,13 @@ SpecializedProtocolConformance::getTypeWitnessSubstAndDecl(
|
||||
for (auto proto : assocType->getConformingProtocols(resolver)) {
|
||||
auto conforms = conformingModule->lookupConformance(specializedType, proto,
|
||||
resolver);
|
||||
assert((conforms.getInt() == ConformanceKind::Conforms ||
|
||||
assert((conforms ||
|
||||
specializedType->is<TypeVariableType>() ||
|
||||
specializedType->isTypeParameter() ||
|
||||
specializedType->is<ErrorType>()) &&
|
||||
"Improperly checked substitution");
|
||||
conformances.push_back(ProtocolConformanceRef(proto, conforms.getPointer()));
|
||||
conformances.push_back(conforms ? *conforms
|
||||
: ProtocolConformanceRef(proto));
|
||||
}
|
||||
|
||||
// Form the substitution.
|
||||
|
||||
Reference in New Issue
Block a user