Merge pull request #40544 from DougGregor/sr-15131-closure-effects

Extend "uses concurrency features" checks for closures currently being type checked
This commit is contained in:
Doug Gregor
2021-12-14 11:02:03 -08:00
committed by GitHub
10 changed files with 207 additions and 87 deletions

View File

@@ -2171,7 +2171,7 @@ ConstraintSystem::matchFunctionTypes(FunctionType *func1, FunctionType *func2,
/// Whether to downgrade to a concurrency warning.
auto isConcurrencyWarning = [&] {
if (contextRequiresStrictConcurrencyChecking(DC))
if (contextRequiresStrictConcurrencyChecking(DC, GetClosureType{*this}))
return false;
switch (kind) {