[Distributed] fix access level of synthesized default dist init

This commit is contained in:
Konrad `ktoso` Malawski
2021-08-28 18:10:06 +09:00
parent 9f1fedb13b
commit e004e6abf7
5 changed files with 9 additions and 21 deletions

View File

@@ -321,6 +321,9 @@ static ConstructorDecl *createImplicitConstructor(NominalTypeDecl *decl,
"Only 'distributed actor' type can gain implicit distributed actor init");
if (swift::ensureDistributedModuleLoaded(decl)) {
// copy access level of distributed actor init from the nominal decl
accessLevel = decl->getEffectiveAccess();
auto transportDecl = ctx.getActorTransportDecl();
// Create the parameter.