mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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:
@@ -2555,10 +2555,7 @@ namespace {
|
||||
// If this is a multi-statement closure, let's mark result
|
||||
// as potential hole right away.
|
||||
return Type(CS.createTypeVariable(
|
||||
resultLocator,
|
||||
(!CS.participatesInInference(closure) || allowResultBindToHole)
|
||||
? TVO_CanBindToHole
|
||||
: 0));
|
||||
resultLocator, allowResultBindToHole ? TVO_CanBindToHole : 0));
|
||||
}();
|
||||
|
||||
// Determine the isolation of the closure.
|
||||
|
||||
Reference in New Issue
Block a user