Skip to content

Commit da65333

Browse files
committed
[CSOptimizer] NFC: Adjust conformance check to use ConstraintSystem::lookupConformance
1 parent 957a5f4 commit da65333

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/Sema/CSOptimizer.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,7 @@ static void determineBestChoicesInContext(
314314
return 0.01;
315315

316316
if (llvm::all_of(protocolRequirements, [&](ProtocolDecl *protocol) {
317-
return TypeChecker::conformsToProtocol(candidateType, protocol,
318-
cs.DC->getParentModule(),
319-
/*allowMissing=*/false);
317+
return bool(cs.lookupConformance(candidateType, protocol));
320318
}))
321319
return 0.7;
322320
}

0 commit comments

Comments
 (0)