File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -1427,9 +1427,19 @@ bool ModuleDecl::isStdlibModule() const {
1427
1427
}
1428
1428
1429
1429
bool ModuleDecl::hasStandardSubstitutions () const {
1430
- return !getParent () &&
1431
- (getName () == getASTContext ().StdlibModuleName ||
1432
- getName () == getASTContext ().Id_Concurrency );
1430
+ if (getParent ())
1431
+ return false ;
1432
+
1433
+ if (getName () == getASTContext ().StdlibModuleName )
1434
+ return true ;
1435
+
1436
+ // The _Concurrency module gets standard substitutions with "new enough"
1437
+ // versions of the module.
1438
+ if (getName () == getASTContext ().Id_Concurrency &&
1439
+ getASTContext ().getProtocol (KnownProtocolKind::SerialExecutor))
1440
+ return true ;
1441
+
1442
+ return false ;
1433
1443
}
1434
1444
1435
1445
bool ModuleDecl::isSwiftShimsModule () const {
You can’t perform that action at this time.
0 commit comments