[CSOptimizer] NFC: Adjust conformance check to use ConstraintSystem::lookupConformance

This commit is contained in:
Pavel Yaskevich
2023-10-10 13:35:29 -07:00
committed by Pavel Yaskevich
parent 957a5f4270
commit da65333d41

View File

@@ -314,9 +314,7 @@ static void determineBestChoicesInContext(
return 0.01;
if (llvm::all_of(protocolRequirements, [&](ProtocolDecl *protocol) {
return TypeChecker::conformsToProtocol(candidateType, protocol,
cs.DC->getParentModule(),
/*allowMissing=*/false);
return bool(cs.lookupConformance(candidateType, protocol));
}))
return 0.7;
}