mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Sema] Remove separate closure type-checking logic
`participatesInInference` is now always true for a non-empty body, remove it along with the separate type-checking logic such that empty bodies are type-checked together with the context.
This commit is contained in:
@@ -7432,16 +7432,6 @@ bool ConstraintSystem::isArgumentGenericFunction(Type argType, Expr *argExpr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ConstraintSystem::participatesInInference(ClosureExpr *closure) const {
|
||||
if (getAppliedResultBuilderTransform(closure))
|
||||
return true;
|
||||
|
||||
if (closure->hasEmptyBody())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
ProtocolConformanceRef
|
||||
ConstraintSystem::lookupConformance(Type type, ProtocolDecl *protocol) {
|
||||
auto cacheKey = std::make_pair(type.getPointer(), protocol);
|
||||
|
||||
Reference in New Issue
Block a user