mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #69391 from hborla/isolated-default-value-revision
[Concurrency] Allow isolated default arguments to be used from across isolation boundaries.
This commit is contained in:
@@ -339,7 +339,14 @@ static ConstructorDecl *createImplicitConstructor(NominalTypeDecl *decl,
|
||||
|
||||
if (ICK == ImplicitConstructorKind::Memberwise) {
|
||||
ctor->setIsMemberwiseInitializer();
|
||||
addNonIsolatedToSynthesized(decl, ctor);
|
||||
|
||||
// FIXME: If 'IsolatedDefaultValues' is enabled, the memberwise init
|
||||
// should be 'nonisolated' if none of the memberwise-initialized properties
|
||||
// are global actor isolated and have non-Sendable type, and none of the
|
||||
// initial values require global actor isolation.
|
||||
if (!ctx.LangOpts.hasFeature(Feature::IsolatedDefaultValues)) {
|
||||
addNonIsolatedToSynthesized(decl, ctor);
|
||||
}
|
||||
}
|
||||
|
||||
// If we are defining a default initializer for a class that has a superclass,
|
||||
|
||||
Reference in New Issue
Block a user