We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
@MainActor(unsafe)
1 parent 72e03b7 commit 1afaf74Copy full SHA for 1afaf74
lib/AST/Decl.cpp
@@ -9090,7 +9090,9 @@ ActorIsolation swift::getActorIsolationOfContext(DeclContext *dc) {
9090
if (auto *tld = dyn_cast<TopLevelCodeDecl>(dc)) {
9091
if (dc->isAsyncContext() || dc->getASTContext().LangOpts.WarnConcurrency) {
9092
if (Type mainActor = dc->getASTContext().getMainActorType())
9093
- return ActorIsolation::forGlobalActor(mainActor, /*unsafe=*/false);
+ return ActorIsolation::forGlobalActor(
9094
+ mainActor,
9095
+ /*unsafe=*/!dc->getASTContext().isSwiftVersionAtLeast(6));
9096
}
9097
9098
0 commit comments