Merge pull request #40388 from DougGregor/swift-6-stricter-concurrency-checking

Swift 6 stricter concurrency checking
This commit is contained in:
Doug Gregor
2021-12-03 08:40:46 -08:00
committed by GitHub
12 changed files with 184 additions and 132 deletions

View File

@@ -2171,8 +2171,7 @@ ConstraintSystem::matchFunctionTypes(FunctionType *func1, FunctionType *func2,
/// Whether to downgrade to a concurrency warning.
auto isConcurrencyWarning = [&] {
if (contextUsesConcurrencyFeatures(DC) ||
Context.LangOpts.isSwiftVersionAtLeast(6))
if (contextRequiresStrictConcurrencyChecking(DC))
return false;
switch (kind) {